A Roslyn-based cross-platform tool that generates an object model diagram from a set of C# source files or assemblies
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
src Added support for comparing assemblies Oct 14, 2018
.gitignore ignore nuget build output Mar 26, 2018
LICENSE Initial commit Mar 19, 2018
README.md Update README.md Mar 28, 2018
Screenshot.png Updated screenshot Mar 20, 2018

README.md

.NET Object Model Diagram Generator

A cross-platform Roslyn-based tool that generates an object model diagram of a set of C# source files

Usage:

dotnet GENERATOR.dll /source=[source folder] /compareSource=[oldSourceFolder] /preprocessors=[defines] /format=[html|image] /ShowPrivate /ShowInternal

Required parameters:
  source        Specifies the folder of source files to include for the object model.
                Separate with ; for multiple folders

Optional parameters:
  compareSource Specifies a folder to compare source and generate a diff model
                This can be useful for finding API changes or compare branches
  format        Format to generate: 'image' generates an image for each object.
                'html' a single html output (html is default)
  preprocessors Define a set of preprocessors values. Use ; to separate multiple
  exclude       Defines one or more strings that can't be part of the path Ie '*/Samples/*;*/UnitTests/*'
                (use forward slash for folder separators)
  regexfilter   Defines a regular expression for filtering on full file names in the source
  ShowPrivate   Show private members (default is false)
  ShowInternal  Show internal members (default is false)

NuGet

As an alternative you can also reference a NuGet package to your class library, and an Object Model Diagram HTML file will be auto-generated when you build your project:

Install-Package dotMorten.OmdGenerator 

An example of a generated output for all of .NET Core can be found here.

It can also be used to compare two folders (for instance two separate branches) and only show changes to the API. Here's an example of .NET CoreFX v2.0 vs Master.

Screenshot

Examples

Generate OMD for .NET Core FX source code, and ignore ref and test folders:

dotnet Generator.dll /source=c:\github\dotnet\corefx\src /exclude="*/ref/*;*/tests/*;*/perftests/*"

Compare .NET CoreFX Master with v2.0.0 repo branches directly from their Github zipped downloads:

dotnet Generator.dll /source=https://github.com/dotnet/corefx/archive/master.zip /compareSource=https://github.com/dotnet/corefx/archive/release/2.0.0.zip /exclude="*/ref/*;*/tests/*;*/perftests/*"