Skip to content

Getting Started

Yan Justino edited this page Apr 1, 2021 · 12 revisions

C4Sharp is a .net library for building C4 Diagrams. Learn what C4S is all about on our homepage or in the tutorial.

Installation

This package is available through Nuget Packages: https://www.nuget.org/packages/C4Sharp

Package Version Downloads
C4Sharp NuGet Nuget

Nuget

Install-Package C4Sharp

.NET CLI

dotnet add package C4Sharp

Dependencies

You need these things to run C4Sharp:

Creating basic structure

C4S diagrams have a basic structure containing a Title, a set of C4 structures and their Relationships. As shown in following code:

var diagram = new <Diagram Type>
{
    Title = "...",
    Structures = new Structure[] { },
    Relationships = new Relationship[]{ }
};

Saving Diagrama

To save or to export (to png) your diagrams, you can use the PlantumlFile class.