RequirementDiagram Class

A requirement diagram, in the style of SysML: requirements, the elements that satisfy or verify them, and the relationships between them (Mermaid requirementDiagram).

public sealed class RequirementDiagram : Diagram
Inheritance
Diagram RequirementDiagram

Constructors

NameDescription
RequirementDiagram()

RequirementDiagram()

RequirementDiagram.cs
public RequirementDiagram()

No documentation is available.

Properties

NameDescription
ClassDefinitionsGets the styles of the CSS classes of the nodes, by name (Mermaid classDef). The class default applies to every node.
DirectionGets or sets the direction of the relationships. The default is DiagramDirection.TopToBottom.
ElementsGets the elements: the parts of other documents that requirements relate to.
RelationshipsGets the relationships, drawn in order.
RequirementsGets the requirements.

ClassDefinitions

RequirementDiagram.cs

Gets the styles of the CSS classes of the nodes, by name (Mermaid classDef). The class default applies to every node.

public IDictionary<string, DiagramStyle> ClassDefinitions { get; }

Gets or sets the direction of the relationships. The default is DiagramDirection.TopToBottom.

public DiagramDirection Direction { get; set; }

Property value

DiagramDirection

Gets the elements: the parts of other documents that requirements relate to.

public IList<RequirementDiagramElement> Elements { get; }

Gets the relationships, drawn in order.

public IList<RequirementRelationship> Relationships { get; }

Gets the requirements.

public IList<RequirementDiagramRequirement> Requirements { get; }

Methods

NameDescription
AddElement(string)Adds an element.
AddRelationship(RequirementDiagramNode, RequirementDiagramNode, RequirementRelationshipKind)Adds a relationship.
AddRequirement(string, RequirementKind)Adds a requirement.
Find(string)Finds a requirement or an element by name.

AddElement(string)

RequirementDiagram.cs

Adds an element.

public RequirementDiagramElement AddElement(string name)

Parameters

name string
The name, unique in the diagram.

Returns

RequirementDiagramElement The element.

AddRelationship(RequirementDiagramNode, RequirementDiagramNode, RequirementRelationshipKind)

RequirementDiagram.cs

Adds a relationship.

Parameters

source RequirementDiagramNode
The source, such as the element that satisfies a requirement.
target RequirementDiagramNode
The target.
kind RequirementRelationshipKind
The kind.

Returns

RequirementRelationship The relationship.

AddRequirement(string, RequirementKind)

RequirementDiagram.cs

Adds a requirement.

public RequirementDiagramRequirement AddRequirement(string name, RequirementKind kind = RequirementKind.Requirement)

Parameters

name string
The name, unique in the diagram.
kind RequirementKind
The kind.

Returns

RequirementDiagramRequirement The requirement.

Finds a requirement or an element by name.

public RequirementDiagramNode? Find(string name)

Parameters

name string
The name.

Returns

RequirementDiagramNode? The node, or null when there is none.