C4Element Class

An element of a C4 diagram: a person, a software system, a container or a component.

public sealed class C4Element : C4Item
Inheritance
C4Item C4Element

Constructors

NameDescription
C4Element(string, C4ElementKind, DiagramText)Initializes a new instance of the C4Element class.

C4Element(string, C4ElementKind, DiagramText)

C4Element.cs

Initializes a new instance of the C4Element class.

public C4Element(string id, C4ElementKind kind, DiagramText label)

Parameters

id string
The identifier (Mermaid alias).
kind C4ElementKind
The kind.
label DiagramText
The name.

Properties

NameDescription
IsExternalGets or sets a value that indicates whether the element is outside of the system being described, drawn in gray (Mermaid _Ext).
KindGets or sets the kind of the element, shown between brackets and with the colors of C4.
ShapeGets or sets the shape of the element. A person is always drawn as a person.
TechnologyGets or sets the technology of a container or a component, shown with its kind, or null for none.

IsExternal

C4Element.cs

Gets or sets a value that indicates whether the element is outside of the system being described, drawn in gray (Mermaid _Ext).

public bool IsExternal { get; set; }

Property value

bool

Gets or sets the kind of the element, shown between brackets and with the colors of C4.

public C4ElementKind Kind { get; set; }

Property value

C4ElementKind

Gets or sets the shape of the element. A person is always drawn as a person.

public C4ElementShape Shape { get; set; }

Property value

C4ElementShape

Technology

C4Element.cs

Gets or sets the technology of a container or a component, shown with its kind, or null for none.

public string? Technology { get; set; }

Property value

string?