Author Topic: C#7 (7.x) .NET Source Code Import Containing Tuples  (Read 123 times)

NW7US

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
    • Tomas Hood / NW7US
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
Tomas Hood

“For me, great algorithms are the poetry of computation. Just like verse, they can be terse, allusive, dense, and even mysterious. But once unlocked, they cast a brilliant new light on some aspect of computing. ” — Francis Sullivan

http://blog.nw7us.us

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
Re: C#7 (7.x) .NET Source Code Import Containing Tuples
« Reply #1 on: December 02, 2017, 10:29:29 am »
Not sure about all that sharp dressed C, but I'd suppose you're trying to import a not supported flavor. Check the docs which C# is supported. Or contact Sparx support if you think it's a bug.

q.