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 2,506 3/19/2024
7.0.187 236 3/17/2024
6.3.185 180 3/15/2024
6.3.183 232 3/15/2024
6.3.181 179 3/14/2024
6.3.179 220 3/14/2024
6.3.177 196 3/14/2024
6.2.175 257 3/1/2024
6.2.173 224 3/1/2024
6.2.172 183 3/1/2024
6.1.166 2,455 11/18/2023
6.1.164 9,692 3/25/2023
6.0.162 2,676 12/26/2022
6.0.161 405 12/26/2022
5.2.159 6,377 6/30/2022
5.2.158 538 6/30/2022
5.2.155 4,492 3/29/2022
5.2.154 562 3/27/2022
5.1.152 1,160 1/5/2022
5.0.151 335 1/5/2022
5.0.150 328 1/5/2022
5.0.149 348 1/3/2022
5.0.148 313 1/3/2022
5.0.147 340 1/3/2022
5.0.146 360 1/3/2022
5.0.145 344 1/3/2022
5.0.144 332 1/3/2022
5.0.143 319 1/3/2022
4.1.134 313 12/22/2021
4.1.133 317 12/21/2021
4.1.132 295 12/21/2021
4.1.131 285 12/20/2021
4.1.130 314 12/20/2021
4.1.129 307 12/20/2021
4.0.127 1,174 11/20/2021
3.2.124 373 11/18/2021
3.2.123 315 11/18/2021
3.2.121 311 11/17/2021
3.2.120 304 11/17/2021
3.1.118 321 11/17/2021
3.0.115 483 11/7/2021
3.0.114 357 11/4/2021
3.0.113 339 11/4/2021
3.0.112 339 11/4/2021
3.0.111 368 11/4/2021
3.0.109 380 11/4/2021
3.0.108 409 11/4/2021
2.2.1 3,886 7/7/2021
2.2.0 370 6/6/2021
2.1.0 377 5/25/2021
2.0.0 384 5/7/2021
1.1.5 382 4/28/2021
1.1.4 389 4/16/2021
1.1.3 480 4/12/2021 1.1.3 is deprecated because it is no longer maintained.