Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 2.27 KB

README.md

File metadata and controls

31 lines (24 loc) · 2.27 KB

PUML Sequence Diagrams from C# Code

This started as sort of a research project whether it is possible to draw sequence diagrams directly from C#-Code using roslyn. Part of it was inspired by Gabriele Tomassetti.

As it looks not totally discouraging I have decided to put the code online. Maybe some ouf you out there can use it as starting point or even want to contribute. I plan to keep this as my project aside work. So do not expect fast progress. Things I plan to set out in the near future:

  • Using it on a larger code base than I have at home
  • Write more tests
  • Try to add a GUI or at least an UI which does not throw away the analyzed data every time it finished analyzing a method
  • Discover how overloaded methods are handeled
  • Look into the interface resolving
  • Look into resolving dependencies across solutions

Feel free to open an issue or comment on existing ones.

How to test it

Go to snapshots and load either the .net472 (WinSeqDiag.exe) version or the netcore (SeqDiagram.dll) versions. Both are CLI only. You have to supply them with a path to a solution, projectname, classname and methodname to analyze. The diagram will be written to the specified output file. In case of the netcore version you will also have to supply the path to the MSBuil.dll of the netcore SDK.

A typical call will be look like: WinSeqDiag -s C:\source\myprojec\mysolution.sln -p MyProject -c MyClass -m MyMethod -o C:\temp\somediagram.wsd

How to compile

The solution is multitarget for .NET 4.7.2 and .netcore 2.2. Be sure to install the v3 pre-releases of Microsoft.CodeAnalysis nuget packages, these are needed for .netcore support. Main differenece between bot targets are the solution and project analyzers. .NET 4.7.2 relies on the MSBuildLocator package which is not available for .netcore.

Expect to see failing acceptance tests if you change code in the DemoNet project or if the DemoNet project is not a build dependency of the acceptance test projects.

Useful resources