C4Item Class

An item of a C4 diagram that relationships can link: an element or a boundary.

public abstract class C4Item

Properties

NameDescription
DescriptionGets or sets the description, or null for none.
IdGets the identifier of the item, unique in the diagram (Mermaid alias).
LabelGets or sets the name.
LinkGets or sets the address the item links to in the SVG, or null for none.
StyleGets or sets the colors of the item: DiagramStyle.Fill, DiagramStyle.Stroke and DiagramStyle.TextColor (Mermaid UpdateElementStyle).
TagsGets or sets the tags, written to Mermaid but not drawn, or null for none.

Description

C4Item.cs

Gets or sets the description, or null for none.

public DiagramText? Description { get; set; }

Property value

DiagramText?

Gets the identifier of the item, unique in the diagram (Mermaid alias).

public string Id { get; }

Property value

string

Gets or sets the name.

public DiagramText Label { get; set; }

Property value

DiagramText

Gets or sets the colors of the item: DiagramStyle.Fill, DiagramStyle.Stroke and DiagramStyle.TextColor (Mermaid UpdateElementStyle).

public DiagramStyle? Style { get; set; }

Property value

DiagramStyle?

Gets or sets the tags, written to Mermaid but not drawn, or null for none.

public string? Tags { get; set; }

Property value

string?

Methods

NameDescription
ToString()Returns the identifier of the item.

ToString()

C4Item.cs

Returns the identifier of the item.

public override string ToString()

Returns

string The identifier.