C4Sharp 3.2.121

There is a newer version of this package available.
See the version list below for details.
dotnet add package C4Sharp --version 3.2.121
NuGet\Install-Package C4Sharp -Version 3.2.121
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="C4Sharp" Version="3.2.121" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add C4Sharp --version 3.2.121
#r "nuget: C4Sharp, 3.2.121"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install C4Sharp as a Cake Addin
#addin nuget:?package=C4Sharp&version=3.2.121

// Install C4Sharp as a Cake Tool
#tool nuget:?package=C4Sharp&version=3.2.121

C4Sharp (C4S) is a .net library for building C4 Model diagrams. It's works like a superset of C4-PlantUML through which developers can create, share, and consume C4 Model diagrams as code (C#) such as Context, Container, Component and Deployment diagrams.

.NET CodeQL

Getting Started

Dependencies

You need these things to run C4Sharp:

Coding

To create C4S diagrams, we need a set of C4 structures and inform their Relationships, as shown in the following example:

structures

To start using C4S, you should create the basic structures of your architecture design, like this:


//Person
public static Person Customer => new Person("customer", "Personal Banking Customer")
{
    Description = "A customer of the bank, with personal bank accounts."
};

// Systems
public static SoftwareSystem BankingSystem => new SoftwareSystem("BankingSystem", "Internet Banking System")
{
    Description = "Allows customers to view information about their bank accounts, and make payments."
};

public static SoftwareSystem Mainframe => new SoftwareSystem("Mainframe", "Mainframe Banking System")
{
    Description = "Stores all of the core banking information about customers, accounts, transactions, etc.",
    Boundary = Boundary.External
};

public static SoftwareSystem MailSystem => new SoftwareSystem("MailSystem", "E-mail system")
{
    Description = "The internal Microsoft Exchange e-mail system.",
    Boundary = Boundary.External
};

Then, you'll be able to create a C4 Context Diagram:


var diagram = new ContextDiagram
{
    Title = "System Context diagram for Internet Banking System",
    Structures = new Structure[]
    {
        Customer,
        BankingSystem,
        Mainframe,
        MailSystem
    },
    Relationships = new []
    {
        (Customer > BankingSystem),
        (Customer < MailSystem)["Sends e-mails to"],
        (BankingSystem > MailSystem)["Sends e-mails", "SMTP"][Neighbor],
        (BankingSystem > Mainframe),
    }
};

new PlantumlSession()
    .UseDiagramImageBuilder()
    .UseStandardLibraryBaseUrl()
    .Export(diagrams);

See more in our sample code:

The result will be:

<p align="center"> <img src="https://raw.githubusercontent.com/8T4/c4sharp/main/docs/images/context-example.png" alt="logo" width='450' > </p>

Learn

To learn more about C4S access our wiki.

Thanks

C4 community

Contributors

Colleagues

Guide to contributing to a GitHub project

This is a guide to contributing to this open source project that uses GitHub. It’s mostly based on how many open sorce projects operate. That’s all there is to it. The fundamentals are:

  • Fork the project & clone locally.
  • Create an upstream remote and sync your local copy before you branch.
  • Branch for each separate piece of work.
  • Do the work, write good commit messages, and read the CONTRIBUTING file if there is one.
  • Push to your origin repository.
  • Create a new PR in GitHub.
  • Respond to any code review feedback.

If you want to contribute to an open source project, the best one to pick is one that you are using yourself. The maintainers will appreciate it!

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  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.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.189 356 3/19/2024
7.0.187 169 3/17/2024
6.3.185 106 3/15/2024
6.3.183 160 3/15/2024
6.3.181 132 3/14/2024
6.3.179 158 3/14/2024
6.3.177 133 3/14/2024
6.2.175 194 3/1/2024
6.2.173 168 3/1/2024
6.2.172 124 3/1/2024
6.1.166 1,422 11/18/2023
6.1.164 7,670 3/25/2023
6.0.162 2,121 12/26/2022
6.0.161 376 12/26/2022
5.2.159 3,907 6/30/2022
5.2.158 495 6/30/2022
5.2.155 3,815 3/29/2022
5.2.154 524 3/27/2022
5.1.152 1,107 1/5/2022
5.0.151 306 1/5/2022
5.0.150 299 1/5/2022
5.0.149 316 1/3/2022
5.0.148 303 1/3/2022
5.0.147 314 1/3/2022
5.0.146 329 1/3/2022
5.0.145 313 1/3/2022
5.0.144 320 1/3/2022
5.0.143 289 1/3/2022
4.1.134 286 12/22/2021
4.1.133 290 12/21/2021
4.1.132 271 12/21/2021
4.1.131 262 12/20/2021
4.1.130 289 12/20/2021
4.1.129 281 12/20/2021
4.0.127 1,149 11/20/2021
3.2.124 363 11/18/2021
3.2.123 290 11/18/2021
3.2.121 285 11/17/2021
3.2.120 280 11/17/2021
3.1.118 295 11/17/2021
3.0.115 455 11/7/2021
3.0.114 333 11/4/2021
3.0.113 317 11/4/2021
3.0.112 313 11/4/2021
3.0.111 332 11/4/2021
3.0.109 357 11/4/2021
3.0.108 384 11/4/2021
2.2.1 3,827 7/7/2021
2.2.0 341 6/6/2021
2.1.0 349 5/25/2021
2.0.0 371 5/7/2021
1.1.5 336 4/28/2021
1.1.4 360 4/16/2021
1.1.3 448 4/12/2021