• This repository has been archived on 23/Dec/2023
  • Stars
    star
    413
  • Rank 104,801 (Top 3 %)
  • Language
    C#
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Structurizr for .NET

Structurizr for .NET

This GitHub repository is a client library for the Structurizr cloud service and on-premises installation . This .NET library isn't as well supported as the original Java version, and some newer features are missing.

Unless you are planning to use .NET code to generate parts of your software architecture model, the Structurizr DSL is the recommended tooling for authoring Structurizr workspaces, while the Structurizr CLI can be used to push/pull workspaces and export views to PlantUML, Mermaid, etc.

A quick example

As an example, the following C# code can be used to create a software architecture model that describes a user using a software system.

Workspace workspace = new Workspace("Getting Started", "This is a model of my software system.");
Model model = workspace.Model;

Person user = model.AddPerson("User", "A user of my software system.");
SoftwareSystem softwareSystem = model.AddSoftwareSystem("Software System", "My software system.");
user.Uses(softwareSystem, "Uses");

ViewSet viewSet = workspace.Views;
SystemContextView contextView = viewSet.CreateSystemContextView(softwareSystem, "SystemContext", "An example of a System Context diagram.");
contextView.AddAllSoftwareSystems();
contextView.AddAllPeople();

Styles styles = viewSet.Configuration.Styles;
styles.Add(new ElementStyle(Tags.SoftwareSystem) { Background = "#1168bd", Color = "#ffffff" });
styles.Add(new ElementStyle(Tags.Person) { Background = "#08427b", Color = "#ffffff", Shape = Shape.Person });

The view can then be exported to be visualised using the Structurizr cloud service or an on-premises installation.

Table of contents