1
Bugs and Issues / Re: Support of C# 3.x automatic properties
« on: March 24, 2016, 06:43:29 am »
I know it's a very old post but since Sparx didn't answer our very valuable question here is a workaround for reverse engineering and see the C# auto-implemented properties showing as class associations.
First of all this method is intend to help on just reverse engineering to facilitate the comprehension of large models AND NOT for bidirectional code engineering.
The key for the problem is the absence of an auto generated backing field for the C# compiler to represent the true UML association that cannot be represented based on methods. Just UML attributes.
Then isted of making reverse engineering based on source code files (.cs or what ever) make reverse engineering base on .Net binaries with Disassembly method (You be prompted to show the path to Peverify.exe, found on Microsoft SDKs). This way the assembly WILL contain the auto generated backing fields necessary to show the correct UML association.
Disadvantages:
You cannot show source code on any element as all will be fixed to file.dll/exe used on reverse engineer;
You cannot edit this reverse engineered elements to synchronize with original code if you have it;
You will see all anonymous types your code have;
But anyway it is still useful.
Hope it can help some of you!
Márcio Mônego
First of all this method is intend to help on just reverse engineering to facilitate the comprehension of large models AND NOT for bidirectional code engineering.
The key for the problem is the absence of an auto generated backing field for the C# compiler to represent the true UML association that cannot be represented based on methods. Just UML attributes.
Then isted of making reverse engineering based on source code files (.cs or what ever) make reverse engineering base on .Net binaries with Disassembly method (You be prompted to show the path to Peverify.exe, found on Microsoft SDKs). This way the assembly WILL contain the auto generated backing fields necessary to show the correct UML association.
Disadvantages:
You cannot show source code on any element as all will be fixed to file.dll/exe used on reverse engineer;
You cannot edit this reverse engineered elements to synchronize with original code if you have it;
You will see all anonymous types your code have;
But anyway it is still useful.
Hope it can help some of you!
Márcio Mônego