ClassRelation Class
A relation between two elements of a class diagram, such as an inheritance or a composition.
public sealed class ClassRelationConstructors
| Name | Description |
|---|---|
| ClassRelation(ClassDiagramElement, ClassDiagramElement) | Initializes a new instance of the ClassRelation class. |
ClassRelation(ClassDiagramElement, ClassDiagramElement)
ClassRelation.csInitializes a new instance of the ClassRelation class.
public ClassRelation(ClassDiagramElement from, ClassDiagramElement to)Parameters
fromClassDiagramElement- The first element, written on the left in Mermaid.
toClassDiagramElement- The second element, written on the right in Mermaid.
Properties
| Name | Description |
|---|---|
| From | Gets the first element. |
| FromCardinality | Gets or sets the multiplicity at ClassRelation.From, such as 1 or 0..*, or null for none. |
| FromEnd | Gets or sets the decoration of the end at ClassRelation.From: A <|-- B has an ClassRelationEnd.Inheritance at A. |
| IsDashed | Gets or sets a value that indicates whether the line is dashed: a dependency or a realization (Mermaid ..). |
| Label | Gets or sets the text in the middle of the relation, or null for none. |
| To | Gets the second element. |
| ToCardinality | Gets or sets the multiplicity at ClassRelation.To, or null for none. |
| ToEnd | Gets or sets the decoration of the end at ClassRelation.To. |
From
ClassRelation.csFromCardinality
ClassRelation.csGets or sets the multiplicity at ClassRelation.From, such as 1 or 0..*, or null for none.
public string? FromCardinality { get; set; }Property value
FromEnd
ClassRelation.csGets or sets the decoration of the end at ClassRelation.From: A <|-- B has an ClassRelationEnd.Inheritance at A.
public ClassRelationEnd FromEnd { get; set; }Property value
IsDashed
ClassRelation.csLabel
ClassRelation.csGets or sets the text in the middle of the relation, or null for none.
public DiagramText? Label { get; set; }Property value
ToCardinality
ClassRelation.csGets or sets the multiplicity at ClassRelation.To, or null for none.
public string? ToCardinality { get; set; }Property value
ToEnd
ClassRelation.csGets or sets the decoration of the end at ClassRelation.To.
public ClassRelationEnd ToEnd { get; set; }