UseCaseDiagram Class
A use case diagram, in the style of UML: actors, the use cases of a system they take part in, the system boundaries, and the relationships between them (Mermaid usecase-beta).
public sealed class UseCaseDiagram : Diagram- Inheritance
DiagramUseCaseDiagram
Constructors
| Name | Description |
|---|---|
| UseCaseDiagram() |
UseCaseDiagram()
UseCaseDiagram.cspublic UseCaseDiagram()No documentation is available.
Properties
| Name | Description |
|---|---|
| Actors | Gets the actors. The actors of the boundaries that are not in this list are drawn too. |
| Boundaries | Gets the system boundaries. |
| ClassDefinitions | Gets the styles of the CSS classes of the elements, by name (Mermaid classDef). The class default applies to every actor, use case and table. |
| Direction | Gets or sets the direction of the relationships. The default is DiagramDirection.LeftToRight. |
| NodeSpacing | Gets or sets the space between two elements of the same rank, in pixels. |
| Notes | Gets the notes. |
| RankSpacing | Gets or sets the space between two ranks, in pixels. |
| Relationships | Gets the relationships, drawn in order. |
| Tables | Gets the tables that show JSON data. |
| UseCases | Gets the use cases. The use cases of the boundaries that are not in this list are drawn too. |
Actors
UseCaseDiagram.csGets the actors. The actors of the boundaries that are not in this list are drawn too.
public IList<UseCaseActor> Actors { get; }Property value
Boundaries
UseCaseDiagram.csClassDefinitions
UseCaseDiagram.csGets the styles of the CSS classes of the elements, by name (Mermaid classDef). The class default applies to every actor, use case and table.
public IDictionary<string, DiagramStyle> ClassDefinitions { get; }Property value
Direction
UseCaseDiagram.csGets or sets the direction of the relationships. The default is DiagramDirection.LeftToRight.
public DiagramDirection Direction { get; set; }Property value
NodeSpacing
UseCaseDiagram.csNotes
UseCaseDiagram.csRankSpacing
UseCaseDiagram.csRelationships
UseCaseDiagram.csGets the relationships, drawn in order.
public IList<UseCaseRelationship> Relationships { get; }Property value
Tables
UseCaseDiagram.csUseCases
UseCaseDiagram.csGets the use cases. The use cases of the boundaries that are not in this list are drawn too.
Property value
Methods
| Name | Description |
|---|---|
| AddActor(string, DiagramText?) | Adds an actor. |
| AddBoundary(string, DiagramText?) | Adds a system boundary. |
| AddNote(UseCaseDiagramElement, DiagramText) | Adds a note. |
| AddRelationship(UseCaseDiagramElement, UseCaseDiagramElement, UseCaseRelationshipKind, DiagramText?) | Adds a relationship. |
| AddTable(string, string) | Adds a table that shows JSON data. |
| AddUseCase(string, DiagramText?, UseCaseShape) | Adds a use case. |
| Find(string) | Finds an actor, a use case or a table by identifier, in the diagram and its boundaries. |
AddActor(string, DiagramText?)
UseCaseDiagram.csAdds an actor.
public UseCaseActor AddActor(string id, DiagramText? label = null)Parameters
idstring- The identifier, which is shown when there is no label.
labelDiagramText?- The name shown, or
nullto show the identifier.
Returns
UseCaseActor The actor.
AddBoundary(string, DiagramText?)
UseCaseDiagram.csAdds a system boundary.
public UseCaseBoundary AddBoundary(string id, DiagramText? title = null)Parameters
idstring- The identifier.
titleDiagramText?- The title, or
nullto show the identifier.
Returns
UseCaseBoundary The boundary.
AddNote(UseCaseDiagramElement, DiagramText)
UseCaseDiagram.csAdds a note.
public UseCaseNote AddNote(UseCaseDiagramElement target, DiagramText text)Parameters
targetUseCaseDiagramElement- The actor or the use case the note is attached to.
textDiagramText- The text.
Returns
UseCaseNote The note.
AddRelationship(UseCaseDiagramElement, UseCaseDiagramElement, UseCaseRelationshipKind, DiagramText?)
UseCaseDiagram.csAdds a relationship.
public UseCaseRelationship AddRelationship(UseCaseDiagramElement from, UseCaseDiagramElement to, UseCaseRelationshipKind kind = UseCaseRelationshipKind.Association, DiagramText? label = null)Parameters
fromUseCaseDiagramElement- The source.
toUseCaseDiagramElement- The target.
kindUseCaseRelationshipKind- The kind. An association has an arrowhead at
to. labelDiagramText?- The text of an association, or
nullfor none.
Returns
UseCaseRelationship The relationship.
AddTable(string, string)
UseCaseDiagram.csAdds a table that shows JSON data.
public UseCaseJsonTable AddTable(string id, string json)AddUseCase(string, DiagramText?, UseCaseShape)
UseCaseDiagram.csAdds a use case.
public UseCase AddUseCase(string id, DiagramText? label = null, UseCaseShape shape = UseCaseShape.Ellipse)Parameters
idstring- The identifier, which is shown when there is no label.
labelDiagramText?- The text shown, or
nullto show the identifier. shapeUseCaseShape- The shape.
Returns
UseCase The use case.
Find(string)
UseCaseDiagram.csFinds an actor, a use case or a table by identifier, in the diagram and its boundaries.
public UseCaseDiagramElement? Find(string id)Parameters
idstring- The identifier.
Returns
UseCaseDiagramElement? The element, or null when there is none.