Reverse Engineering a C# Solution

China☆狼群 提交于 2020-01-01 03:27:11

问题


I know Visual Studio 2010 Ultimate has some abilities, and I would normally do this by instinct, but I am on a very tight schedule. I also have Visio 2010 installed and integrated into VS, but its reverse engineer function doesn't seem to do much, and has to be run on a per project basis, and a hindrance here is the solution structure, with several solution folders each holding a multitude of projects.

I would like some advice on how to go about reverse engineering a C# solution into dependency diagrams, sequence diagrams and class diagrams.


回答1:


If you use Visual Studio, the 2010 Ultimate edition supports 5 commonly-used UML diagrams (class , sequence , use case , activity , and component ). You can generate sequence diagrams and layer diagrams from code . If you also install the Visualization & Modeling Feature Pack with VS 2010 Ultimate, you can create UML class diagrams from code and generate code from UML class diagrams .

You can also explore existing code by using Architecture Explorer and visualize relationships in code by generating dependency graphs , which you can then also use to create layer diagrams.

As alternative, you can use Altova Usemodel or Sparx System's Enterprise Architect




回答2:


since C# is using JIT compilation, an intermediate code is generated in compilation and there is a way to see that intermediate code.

reverse engineering in C#




回答3:


This tip is from : http://www.devx.com/tips/Tip/30046 I am just pasting here. You should give credit to the original author if he is on StacOverflow

Open a window in VS.NET. Go to Project—>Visio UML—>Reverse Engineer. This automatically shows you the class diagrams with perfect relationships. Note: This tip will work with VS.NET Version 1.0.0 and higher.



来源:https://stackoverflow.com/questions/4668349/reverse-engineering-a-c-sharp-solution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!