dll2mmd 1.0.6

dotnet tool install --global dll2mmd --version 1.0.6                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dll2mmd --version 1.0.6                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dll2mmd&version=1.0.6                
nuke :add-package dll2mmd --version 1.0.6                

dll2mmd

What is dll2mmd

Dll2mmd is a dotnet tool for generating mermaid.js class-diagram from assemblies.

Installing dll2mmd

  1. Install .Net SDK 6.0 or later.

  2. Install dll2mmd as a global dotnet tool.

    $ dotnet tool install --global dll2mmd
    You can invoke the tool using the following command: dll2mmd
    Tool 'dll2mmd' (version '1.0.5') was successfully installed.
    

Usage

Description:
  Generate mermaid.js class-diagram from .net dll files.

Usage:
  dll2mmd [options]

Options:
  -o, --output <output>           Output file. [default: output.md]
  -ns, --namespace <namespace>    Namespace from which to fetch classes. []
  -f, --files <files> (REQUIRED)  Dll files from which to fetch classes.
  -t, --type-names <type-names>   Name of specific classes to form the diagram. []
  --ignore-dependency             If true, only dependency of inheritance and implementation would be generated.
  --version                       Show version information
  -?, -h, --help                  Show help and usage information

Example

  1. Generate Zoo.dll by compiling following file.

    namespace Zoo;
    public interface IAnimal
    {
        string Name { get; set; }
        IFood FavorateFood { get; set; }
        void Speak();
    }
    
    public abstract class Mammal : IAnimal
    {
        public string Name { get; set; }
        public IFood FavorateFood { get; set; }
    
        public abstract void Speak();
    
        protected Mammal(string name, IFood favorateFood)
        {
            Name = name;
            FavorateFood = favorateFood;
        }
    }
    
    public class Cat : Mammal
    {
        public Cat(string name, IFood favorateFood) : base(name, favorateFood) {}
        public override void Speak()
        {
            Console.WriteLine("meow");
        }
    }
    
    public class Dog : Mammal
    {
        public Dog(string name, IFood favorateFood) : base(name, favorateFood) { }
        public override void Speak()
        {
            Console.WriteLine("woof");
        }
    }
    
    public interface IFood
    {
        string Taste { get; set; }
    }
    
    public class Fish : IFood, IAnimal
    {
        public string Taste { get; set; }
        public string Name { get; set; }
        public IFood FavorateFood { get; set; }
    
        public Fish(string taste, string name, IFood favorateFood)
        {
            Taste = taste;
            Name = name;
            FavorateFood = favorateFood;
        }
        public void Speak()
        {
            Console.WriteLine("...");
        }
    }
    
    public class Bone : IFood
    {
        public string Taste { get; set; }
        public Bone(string taste)
        {
            Taste = taste;
        }
    }
    
    
  2. Run dll2mmd to generate output.md from Zoo.dll.

    $ dll2mmd -f Zoo.dll
    
  3. output.md

    classDiagram
    
    class IAnimal
    IAnimal : +String Name
    IAnimal : +IFood FavorateFood
    IAnimal : +Speak() Void
    
    class Mammal
    Mammal : +String Name
    Mammal : +IFood FavorateFood
    Mammal : +Speak() Void
    
    class Cat
    Cat : +String Name
    Cat : +IFood FavorateFood
    Cat : +Speak() Void
    
    class Dog
    Dog : +String Name
    Dog : +IFood FavorateFood
    Dog : +Speak() Void
    
    class IFood
    IFood : +String Taste
    
    class Fish
    Fish : +String Taste
    Fish : +String Name
    Fish : +IFood FavorateFood
    Fish : +Speak() Void
    
    class Bone
    Bone : +String Taste
    
    
    IAnimal <|.. Mammal
    Mammal <|-- Cat
    Mammal <|-- Dog
    IFood <|.. Fish
    IAnimal <|.. Fish
    IFood <|.. Bone
    
    
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.6 923 6/30/2023
1.0.5 142 6/29/2023
1.0.4 178 6/29/2023
1.0.3 192 6/29/2023
1.0.2 195 6/29/2023
1.0.1 173 6/29/2023
1.0.0 195 6/28/2023