You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate Mermaid HTML diagrammer from input assembly via ilspycmd (#3324)
* added mermaid class diagrammer
contributed from https://github.com/h0lg/netAmermaid - find earlier git history there
* reading from embedded resource instead of file
* swapped out icon to brand diagrammers as an ILSpy product
reusing linked ..\ILSpy\Images\ILSpy.ico from UI project
* added required ilspycmd options and routed call
* adjusted VS Code task to generate model.json required by the JS/CSS/HTML dev loop
* added debug launchSettings
* updated help command output
* using ILSpyX build info in generated diagrammers
removing unused code
* using explicit type where it's not obvious
* outputting in to a folder next to and named after the input assembly + " diagrammer" by default
* renamed diagrammer output to index.html
to support default web server configs in the wild
* improved instructions for creating an off-line diagrammer
* added developer-facing doco for how to edit the HTML/JS/CSS parts
* renamed to remove netAmermaid branding
* updated repo URL and doco link to new Wiki page
* copied over doco
* removed obsolete parts
* moved CLI doco into ILSpyCmd README
* removed end-user facing chapters that go into the Wiki from dev-facing doco
* updated to ilspycmd API and rebranded to ILSpy
* removed doco that's now in https://github.com/icsharpcode/ILSpy/wiki/Diagramming
* added tasks
[Option("--disable-updatecheck","If using ilspycmd in a tight loop or fully automated scenario, you might want to disable the automatic update check.",CommandOptionType.NoValue)]
[Option(generateDiagrammerCmd,"Generates an interactive HTML diagrammer app from selected types in the target assembly"+
133
+
" - to the --outputdir or in a 'diagrammer' folder next to to the assembly by default.",CommandOptionType.NoValue)]
134
+
publicboolGenerateDiagrammer{get;}
135
+
136
+
[Option(include,"An optional regular expression matching Type.FullName used to whitelist types to include in the generated diagrammer.",CommandOptionType.SingleValue)]
137
+
publicstringInclude{get;set;}
138
+
139
+
[Option(exclude,"An optional regular expression matching Type.FullName used to blacklist types to exclude from the generated diagrammer.",CommandOptionType.SingleValue)]
140
+
publicstringExclude{get;set;}
141
+
142
+
[Option(generateDiagrammerCmd+"-report-excluded","Outputs a report of types excluded from the generated diagrammer"+
143
+
$" - whether by default because compiler-generated, explicitly by '{exclude}' or implicitly by '{include}'."+
144
+
" You may find this useful to develop and debug your regular expressions.",CommandOptionType.NoValue)]
145
+
publicboolReportExludedTypes{get;set;}
146
+
147
+
[Option(generateDiagrammerCmd+"-docs","The path or file:// URI of the XML file containing the target assembly's documentation comments."+
148
+
" You only need to set this if a) you want your diagrams annotated with them and b) the file name differs from that of the assmbly."+
149
+
" To enable XML documentation output for your assmbly, see https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/#create-xml-documentation-output",
[Option(generateDiagrammerCmd+"-strip-namespaces","Optional space-separated namespace names that are removed for brevity from XML documentation comments."+
155
+
" Note that the order matters: e.g. replace 'System.Collections' before 'System' to remove both of them completely.",CommandOptionType.MultipleValue)]
156
+
publicstring[]StrippedNamespaces{get;set;}
157
+
158
+
[Option(generateDiagrammerCmd+"-json-only",
159
+
"Whether to generate a model.json file instead of baking it into the HTML template."+
160
+
" This is useful for the HTML/JS/CSS development loop.",CommandOptionType.NoValue,
161
+
ShowInHelpText=false)]// developer option, output is really only useful in combination with the corresponding task in html/gulpfile.js
// including types in LightJson namespace while excluding types in nested LightJson.Serialization namespace, matched by what returns System.Type.FullName
0 commit comments