SequenceDiagram Class
A sequence diagram: participants side by side, with their lifelines, and the messages they exchange over time, from the top to the bottom, with activations, notes and blocks such as loops and alternatives (Mermaid sequenceDiagram).
public sealed class SequenceDiagram : Diagram- Inheritance
DiagramSequenceDiagram
Constructors
| Name | Description |
|---|---|
| SequenceDiagram() |
SequenceDiagram()
SequenceDiagram.cspublic SequenceDiagram()No documentation is available.
Properties
| Name | Description |
|---|---|
| Boxes | Gets the boxes that group participants. |
| MirrorParticipants | Gets or sets a value that indicates whether the participants are drawn below the lifelines too. The default is true (Mermaid mirrorActors). |
| Participants | Gets the participants, from left to right. A participant that a message creates is in this list too. |
| Steps | Gets the steps of the diagram, from the top to the bottom: messages, notes, activations, blocks... |
Boxes
SequenceDiagram.csMirrorParticipants
SequenceDiagram.csParticipants
SequenceDiagram.csGets the participants, from left to right. A participant that a message creates is in this list too.
public IList<SequenceParticipant> Participants { get; }Property value
Steps
SequenceDiagram.csGets the steps of the diagram, from the top to the bottom: messages, notes, activations, blocks...
public IList<SequenceStep> Steps { get; }Property value
Methods
| Name | Description |
|---|---|
| AddBlock(SequenceBlockKind, DiagramText?) | Adds a block, such as a loop or an alternative, with its first section. |
| AddMessage(SequenceParticipant, SequenceParticipant, DiagramText?, SequenceLineStyle) | Adds a message, with an arrowhead at the target. |
| AddNote(DiagramText, SequenceNotePosition, SequenceParticipant[]) | Adds a note. |
| AddParticipant(string, DiagramText?, SequenceParticipantKind) | Adds a participant. |
| EnumerateSteps() | Enumerates the steps and the steps of the blocks, depth first, in order. |
| Find(string) | Finds a participant by identifier. |
AddBlock(SequenceBlockKind, DiagramText?)
SequenceDiagram.csAdds a block, such as a loop or an alternative, with its first section.
public SequenceBlock AddBlock(SequenceBlockKind kind, DiagramText? label = null)Parameters
kindSequenceBlockKind- The kind.
labelDiagramText?- The text of the first section, or
nullfor none.
Returns
SequenceBlock The block.
AddMessage(SequenceParticipant, SequenceParticipant, DiagramText?, SequenceLineStyle)
SequenceDiagram.csAdds a message, with an arrowhead at the target.
public SequenceMessage AddMessage(SequenceParticipant from, SequenceParticipant to, DiagramText? text = null, SequenceLineStyle lineStyle = SequenceLineStyle.Solid)Parameters
fromSequenceParticipant- The sender.
toSequenceParticipant- The receiver, which can be the sender.
textDiagramText?- The text.
lineStyleSequenceLineStyle- The style of the line.
Returns
SequenceMessage The message.
AddNote(DiagramText, SequenceNotePosition, SequenceParticipant[])
SequenceDiagram.csAdds a note.
public SequenceNote AddNote(DiagramText text, SequenceNotePosition position, params SequenceParticipant[] participants)Parameters
textDiagramText- The text.
positionSequenceNotePosition- Where the note is, relative to the participants.
participantsSequenceParticipant[]- One participant, or two for a note over both.
Returns
SequenceNote The note.
AddParticipant(string, DiagramText?, SequenceParticipantKind)
SequenceDiagram.csAdds a participant.
public SequenceParticipant AddParticipant(string id, DiagramText? label = null, SequenceParticipantKind kind = SequenceParticipantKind.Participant)Parameters
idstring- The identifier, which is shown when there is no label.
labelDiagramText?- The name shown, or
nullto show the identifier. kindSequenceParticipantKind- How the participant is drawn.
Returns
SequenceParticipant The participant.
EnumerateSteps()
SequenceDiagram.csEnumerates the steps and the steps of the blocks, depth first, in order.
public IEnumerable<SequenceStep> EnumerateSteps()Returns
IEnumerable<SequenceStep> The steps.
Find(string)
SequenceDiagram.csFinds a participant by identifier.
public SequenceParticipant? Find(string id)Parameters
idstring- The identifier.
Returns
SequenceParticipant? The participant, or null when there is none.