C4Sharp 3.2.121
See the version list below for details.
dotnet add package C4Sharp --version 3.2.121
NuGet\Install-Package C4Sharp -Version 3.2.121
<PackageReference Include="C4Sharp" Version="3.2.121" />
paket add C4Sharp --version 3.2.121
#r "nuget: C4Sharp, 3.2.121"
// 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.
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 | Versions 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. |
-
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,982 | 3/19/2024 | |
7.0.187 | 237 | 3/17/2024 | |
6.3.185 | 181 | 3/15/2024 | |
6.3.183 | 233 | 3/15/2024 | |
6.3.181 | 180 | 3/14/2024 | |
6.3.179 | 221 | 3/14/2024 | |
6.3.177 | 202 | 3/14/2024 | |
6.2.175 | 258 | 3/1/2024 | |
6.2.173 | 225 | 3/1/2024 | |
6.2.172 | 184 | 3/1/2024 | |
6.1.166 | 2,484 | 11/18/2023 | |
6.1.164 | 9,878 | 3/25/2023 | |
6.0.162 | 2,728 | 12/26/2022 | |
6.0.161 | 406 | 12/26/2022 | |
5.2.159 | 6,504 | 6/30/2022 | |
5.2.158 | 539 | 6/30/2022 | |
5.2.155 | 4,531 | 3/29/2022 | |
5.2.154 | 563 | 3/27/2022 | |
5.1.152 | 1,163 | 1/5/2022 | |
5.0.151 | 336 | 1/5/2022 | |
5.0.150 | 329 | 1/5/2022 | |
5.0.149 | 349 | 1/3/2022 | |
5.0.148 | 314 | 1/3/2022 | |
5.0.147 | 341 | 1/3/2022 | |
5.0.146 | 364 | 1/3/2022 | |
5.0.145 | 345 | 1/3/2022 | |
5.0.144 | 333 | 1/3/2022 | |
5.0.143 | 320 | 1/3/2022 | |
4.1.134 | 316 | 12/22/2021 | |
4.1.133 | 318 | 12/21/2021 | |
4.1.132 | 296 | 12/21/2021 | |
4.1.131 | 286 | 12/20/2021 | |
4.1.130 | 315 | 12/20/2021 | |
4.1.129 | 310 | 12/20/2021 | |
4.0.127 | 1,175 | 11/20/2021 | |
3.2.124 | 374 | 11/18/2021 | |
3.2.123 | 316 | 11/18/2021 | |
3.2.121 | 312 | 11/17/2021 | |
3.2.120 | 305 | 11/17/2021 | |
3.1.118 | 324 | 11/17/2021 | |
3.0.115 | 484 | 11/7/2021 | |
3.0.114 | 360 | 11/4/2021 | |
3.0.113 | 342 | 11/4/2021 | |
3.0.112 | 340 | 11/4/2021 | |
3.0.111 | 369 | 11/4/2021 | |
3.0.109 | 381 | 11/4/2021 | |
3.0.108 | 410 | 11/4/2021 | |
2.2.1 | 3,889 | 7/7/2021 | |
2.2.0 | 371 | 6/6/2021 | |
2.1.0 | 380 | 5/25/2021 | |
2.0.0 | 385 | 5/7/2021 | |
1.1.5 | 383 | 4/28/2021 | |
1.1.4 | 390 | 4/16/2021 | |
1.1.3 | 481 | 4/12/2021 |