Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - NW7US

Pages: [1]
1
Bugs and Issues / C#7 (7.x) .NET Source Code Import Containing Tuples
« on: December 02, 2017, 09:11:06 am »
Consider the following C#7.NET code:

Code: [Select]
private static async Task<(SocketError receiveResult, string receivedMessage)> TomasReceiveAsync(Socket accepted) {
...

This
Code: [Select]
(Type localParameterName, Type anotherParameter) is a Tuple.  Reference: https://msdn.microsoft.com/en-us/magazine/mt493248.aspx

There are additional ways in which tuples are referenced, but I suspect a method signature is the most relevant to importing for UML and recording, etc.

When I try to import code that includes anything with the Tuple syntax, I get an error, and I cannot generate UML, etc.

Error is something along the line of "Syntax error: unknown '('"

Is there an MDG fix for this?

Thanks,

Tomas

2
Thank you for the response.  I've sent an email regarding this, today.

3
Greetings.

I am using EA Ultimate 13. When performing the "Import Source Directory..." task under "Code Engineering" (Ctrl+Shft+U), an error occurs.  When the importing process works on the following example code, the error will be a, "Unexpected symbol", on the "AnotherNameSpace" name space symbol.

Consider:

Code: [Select]
// file ParentClass.cs

using static AnotherNameSpace.AnotherClass;

namespace ExampleStaticImportNameSpace
{
    /// <summary>
    /// The entry point into the library
    /// </summary>
    public class ParentClass
    {
        /// <summary>
        /// Oh, oh, oh, CallMeFirst!
        /// </summary>
        public void CallMeFirst()
        {
            int grabAnInteger = CoolMethod(9);
            grabAnInteger++;
        }
    }
}

... and ...

Code: [Select]
// file: AnotherClass.cs

namespace AnotherNameSpace
{
    /// <summary>
    /// Just another typical class.
    /// </summary>
    public static class AnotherClass
    {
        /// <summary>
        /// A really cool method
        /// </summary>
        /// <param name="passThroughValue"></param>
        /// <returns></returns>
        public static int CoolMethod(int passThroughValue)
        {
            return passThroughValue;
        }
    }
}


The directive, "using static AnotherNameSpace.AnotherClass;" trips EA, and the source is not imported nor reverse engineered and modeled.


http://nw7us.us/images/UnexpectedSymbol.jpg

I've had to go change a very large number of my project files to refactor out the "using static" and resolve the ripple effect throughout the source code.

I wonder if this could be fixed, at some point.  If this works when some preference setting is changed in EA, would you let me know?

Thank you,

Tomas Hood

Pages: [1]