ArchitectureDiagram Class

An architecture diagram: services drawn as icons, junctions, groups, and edges that leave and reach the services by a given side (Mermaid architecture-beta). The sides of the edges place the services on a grid: an edge from the right of A to the left of B puts B on the right of A.

public sealed class ArchitectureDiagram : Diagram
Inheritance
Diagram ArchitectureDiagram

Constructors

NameDescription
ArchitectureDiagram()

ArchitectureDiagram()

ArchitectureDiagram.cs
public ArchitectureDiagram()

No documentation is available.

Properties

NameDescription
AlignmentsGets the alignments: services and junctions placed on a row or a column, in order.
EdgesGets the edges.
GroupPaddingGets or sets the space between the frame of a group and its content, in pixels. The default is 40.
GroupsGets the top-level groups.
IconSizeGets or sets the size of the icons of the services, in pixels. The default is 80.
NodesGets the services and the junctions that are in no group, in order.

Gets the alignments: services and junctions placed on a row or a column, in order.

public IList<ArchitectureAlignment> Alignments { get; }

Gets the edges.

public IList<ArchitectureEdge> Edges { get; }

Gets or sets the space between the frame of a group and its content, in pixels. The default is 40.

public double GroupPadding { get; set; }

Property value

double

Gets the top-level groups.

public IList<ArchitectureGroup> Groups { get; }

Gets or sets the size of the icons of the services, in pixels. The default is 80.

public double IconSize { get; set; }

Property value

double

Gets the services and the junctions that are in no group, in order.

public IList<ArchitectureNode> Nodes { get; }

Methods

NameDescription
AddEdge(ArchitectureNode, ArchitectureSide, ArchitectureNode, ArchitectureSide)Adds an edge.
AddGroup(string, DiagramText?, string?)Adds a group that is in no group.
AddService(string, DiagramText?, string?)Adds a service that is in no group.
EnumerateGroups()Enumerates the groups and their nested groups, depth first.
EnumerateNodes()Enumerates the services and the junctions: those in no group, then those of the groups.

AddEdge(ArchitectureNode, ArchitectureSide, ArchitectureNode, ArchitectureSide)

ArchitectureDiagram.cs

Adds an edge.

Parameters

from ArchitectureNode
The first node.
fromSide ArchitectureSide
The side of from the edge leaves.
to ArchitectureNode
The second node.
toSide ArchitectureSide
The side of to the edge reaches.

Returns

ArchitectureEdge The edge.

AddGroup(string, DiagramText?, string?)

ArchitectureDiagram.cs

Adds a group that is in no group.

public ArchitectureGroup AddGroup(string id, DiagramText? title = null, string? icon = null)

Parameters

id string
The identifier.
title DiagramText?
The title, or null for none.
icon string?
The icon shown before the title, or null for none.

Returns

ArchitectureGroup The group.

AddService(string, DiagramText?, string?)

ArchitectureDiagram.cs

Adds a service that is in no group.

public ArchitectureService AddService(string id, DiagramText? title = null, string? icon = null)

Parameters

id string
The identifier.
title DiagramText?
The title shown below the icon, or null for none.
icon string?
The icon: cloud, database, disk, internet or server, or null for none.

Returns

ArchitectureService The service.

EnumerateGroups()

ArchitectureDiagram.cs

Enumerates the groups and their nested groups, depth first.

public IEnumerable<ArchitectureGroup> EnumerateGroups()

EnumerateNodes()

ArchitectureDiagram.cs

Enumerates the services and the junctions: those in no group, then those of the groups.

public IEnumerable<ArchitectureNode> EnumerateNodes()