.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Holger Schmidt 09ed31d391
Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324)
6 months ago
..
Extensions Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
html Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
ClassDiagrammer.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
ClassDiagrammerFactory.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
EmbeddedResource.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
Factory.BuildTypes.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
Factory.FlatMembers.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
Factory.Relationships.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
Factory.TypeIds.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
Factory.TypeNames.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
GenerateHtmlDiagrammer.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
Generator.Run.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
ReadMe.md Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago
XmlDocumentationFormatter.cs Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324) 6 months ago

ReadMe.md

How does it work?

To extract the type info from the source assembly, ILSpy side-loads it including all its dependencies.

The extracted type info is structured into a model optimized for the HTML diagrammer and serialized to JSON. The model is a mix between drop-in type definitions in mermaid class diagram syntax and destructured metadata about relations, inheritance and documentation comments.

The JSON type info is injected into the template.html alongside other resources like the script.js at corresponding {{placeholders}}. It comes baked into the HTML diagrammer to enable

  • accessing the data and
  • importing the mermaid module from a CDN

locally without running a web server while also avoiding CORS restrictions.

In the final step, the HTML diagrammer app re-assembles the type info based on the in-app type selection and rendering options to generate mermaid class diagrams with the types, their relations and as much inheritance detail as you need.