-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding EnterpriseDiagramBuilder.cs Structure into sample project
- Loading branch information
1 parent
10fd512
commit c8295f9
Showing
4 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/samples/C4Sharp.Sample/Diagrams/EnterpriseDiagramBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
using C4Sharp.Diagrams.Core; | ||
using C4Sharp.Models; | ||
using C4Sharp.Models.Relationships; | ||
using C4Sharp.Sample.Structures; | ||
|
||
namespace C4Sharp.Sample.Diagrams | ||
{ | ||
using static Position; | ||
using static People; | ||
using static Systems; | ||
|
||
public class EnterpriseDiagramBuilder | ||
{ | ||
public static ContextDiagram Build() | ||
{ | ||
return new () | ||
{ | ||
Title = "System Enterprise diagram for Internet Banking System", | ||
Structures = new Structure[] | ||
{ | ||
Customer, | ||
new EnterpriseBoundary("eboundary", "Domain A") | ||
{ | ||
Structures = new Structure [] | ||
{ | ||
BankingSystem, | ||
new EnterpriseBoundary("eboundary1", "Domain Internal Users") | ||
{ | ||
Structures = new Structure [] | ||
{ | ||
InternalCustomer, | ||
} | ||
}, | ||
new EnterpriseBoundary("eboundary2", "Domain Managers") | ||
{ | ||
Structures = new Structure [] | ||
{ | ||
Manager, | ||
} | ||
}, | ||
} | ||
}, | ||
Mainframe, | ||
MailSystem | ||
}, | ||
Relationships = new[] | ||
{ | ||
Customer > BankingSystem, | ||
InternalCustomer > BankingSystem, | ||
Manager > BankingSystem, | ||
(Customer < MailSystem)["Sends e-mails to"], | ||
(BankingSystem > MailSystem)["Sends e-mails", "SMTP"][Neighbor], | ||
BankingSystem > Mainframe, | ||
} | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters