C4Relationship Class
A relationship of a C4 diagram: a line from an item to another, with its text and its technology.
public sealed class C4RelationshipConstructors
| Name | Description |
|---|---|
| C4Relationship(C4Item, C4Item, DiagramText) | Initializes a new instance of the C4Relationship class. |
C4Relationship(C4Item, C4Item, DiagramText)
C4Relationship.csInitializes a new instance of the C4Relationship class.
public C4Relationship(C4Item from, C4Item to, DiagramText label)Parameters
fromC4Item- The source.
toC4Item- The target.
labelDiagramText- The text.
Properties
| Name | Description |
|---|---|
| Description | Gets or sets the description, written to Mermaid but not drawn, or null for none. |
| From | Gets the source. |
| Kind | Gets or sets the kind, which sets the arrowheads. The direction hints of Mermaid (Rel_U...) do not move the items. |
| Label | Gets or sets the text. |
| LabelOffsetX | Gets or sets how far the text is moved right from the middle of the line, in pixels. |
| LabelOffsetY | Gets or sets how far the text is moved down from the middle of the line, in pixels. |
| Link | Gets or sets the address of the relationship, written to Mermaid but not drawn, or null for none. |
| Style | Gets or sets the colors of the line (DiagramStyle.Stroke) and of the text (DiagramStyle.TextColor) (Mermaid UpdateRelStyle). |
| Tags | Gets or sets the tags, written to Mermaid but not drawn, or null for none. |
| Technology | Gets or sets the technology, shown between brackets below the text, or null for none. |
| To | Gets the target. |
Description
C4Relationship.csGets or sets the description, written to Mermaid but not drawn, or null for none.
public DiagramText? Description { get; set; }Property value
Gets or sets the kind, which sets the arrowheads. The direction hints of Mermaid (Rel_U...) do not move the items.
public C4RelationshipKind Kind { get; set; }Property value
Label
C4Relationship.csLabelOffsetX
C4Relationship.csLabelOffsetY
C4Relationship.csStyle
C4Relationship.csGets or sets the colors of the line (DiagramStyle.Stroke) and of the text (DiagramStyle.TextColor) (Mermaid UpdateRelStyle).
public DiagramStyle? Style { get; set; }