menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class UmlSequenceParticipant - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class UmlSequenceParticipant

    Represents a participant in the sequence diagram, such as an actor or object. Participants are the entities that interact with each other through message exchanges in the sequence diagram, displayed as vertical lifelines with headers showing their names or roles.

    Inheritance
    System.Object
    UmlSequenceParticipant
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class UmlSequenceParticipant : Object
    Remarks

    In UML sequence diagrams, participants can represent:

    • Actors - External entities that initiate interactions (users, systems, etc.)
    • Objects - Internal system components, classes, or services
    • Boundary objects - Interface elements like UI components
    • Control objects - Controllers or coordinators
    • Entity objects - Data or business objects
    Each participant is rendered with a header box containing its name/content and a vertical dashed lifeline extending downward. Activation boxes can be added to show when the participant is actively processing or responding to messages.
    Examples
    <SfDiagramComponent Height="600px" Model="@umlModel">
    </SfDiagramComponent>
    @code
    {
        UmlSequenceDiagramModel umlModel;
        protected override void OnInitialized()
        {
        umlModel = new UmlSequenceDiagramModel()
        {
            Participants = new List<UmlSequenceParticipant>()
            {
                new UmlSequenceParticipant()
                {
                    ID = "User",
                    Content= "User",
                    ShowDestructionMarker= true,
                    IsActor= true,
                    ActivationBoxes= new List<UmlSequenceActivationBox>()
                    {
                        new UmlSequenceActivationBox() { ID = "act1", StartMessageID= "MSG1", EndMessageID= "MSG3" }
                    }
                },
                new UmlSequenceParticipant()
                {
                    ID = "Server",
                    Content= "Server",
                    ShowDestructionMarker= true,
                    IsActor= false,
                    ActivationBoxes= new List<UmlSequenceActivationBox>()
                    {
                        new UmlSequenceActivationBox() { ID = "act2", StartMessageID= "MSG1", EndMessageID= "MSG3" }
                    }
                }
            }
            };
        }
    }

    Constructors

    UmlSequenceParticipant()

    Declaration
    public UmlSequenceParticipant()

    Properties

    ActivationBoxes

    Gets or sets the collection of activation boxes associated with this participant. Activation boxes represent periods when the participant is actively processing or executing operations, typically shown as rectangular boxes on the lifeline.

    Declaration
    public IEnumerable<UmlSequenceActivationBox> ActivationBoxes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<UmlSequenceActivationBox>

    An System.Collections.Generic.IEnumerable<> representing the activation periods for the participant. Each activation box defines a time span during which the participant is actively involved in processing, bounded by start and end messages. Activation boxes are rendered as narrow rectangular bars overlaying the participant's lifeline. The default value is an empty collection.

    Remarks

    Activation boxes (also called execution specifications) indicate when a participant is actively executing code, processing requests, or performing operations. They help visualize the control flow and show which participants are active at any given time in the sequence. Multiple activation boxes can overlap or be nested to represent concurrent processing or recursive calls. The boxes are positioned vertically based on the associated message timing.

    Examples
    <SfDiagramComponent Height="600px" Model="@umlModel">
    </SfDiagramComponent>
    @code
    {
        UmlSequenceDiagramModel umlModel;
        protected override void OnInitialized()
        {
        umlModel = new UmlSequenceDiagramModel()
        {
            Participants = new List<UmlSequenceParticipant>()
            {
                new UmlSequenceParticipant()
                {
                    ID = "User",
                    Content= "User",
                    ShowDestructionMarker= true,
                    IsActor= true,
                    ActivationBoxes= new List<UmlSequenceActivationBox>()
                    {
                        new UmlSequenceActivationBox() { ID = "act1", StartMessageID= "MSG1", EndMessageID= "MSG3" }
                    }
                },
                new UmlSequenceParticipant()
                {
                    ID = "Server",
                    Content= "Server",
                    ShowDestructionMarker= true,
                    IsActor= false,
                    ActivationBoxes= new List<UmlSequenceActivationBox>()
                    {
                        new UmlSequenceActivationBox() { ID = "act2", StartMessageID= "MSG1", EndMessageID= "MSG3" }
                    }
                }
            },
            Messages = new List<UmlSequenceMessage>()
            {
                new UmlSequenceMessage()
                {
                    ID = "MSG1",
                    Content = "User sends request",
                    FromParticipantID = "User",
                    ToParticipantID = "Server"
                },
                new UmlSequenceMessage()
                {
                    ID = "MSG2",
                    Content = "Processing",
                    FromParticipantID = "Server",
                    ToParticipantID = "Server"
                },
                new UmlSequenceMessage()
                {
                    ID = "MSG3",
                    Content = "Server sends response",
                    FromParticipantID = "Server",
                    ToParticipantID = "User"
                }
            }
            };
        }
    }

    Content

    Gets or sets the name or description of the participant. This is the display text that appears in the participant header box and represents the human-readable name or role of the participant.

    Declaration
    public string Content { get; set; }
    Property Value
    Type Description
    System.String

    A System.String that represents the display name or label of the participant shown in the sequence diagram. This text is rendered in the participant's header box at the top of the lifeline and should be descriptive and user-friendly. The default value is an empty string.

    Remarks

    The Content property is used for visual display purposes, unlike the ID property which is used for internal referencing. The content can include spaces, special characters, and descriptive text that helps users understand the participant's role in the sequence. Common examples include "User", "Web Server", "Database", "Payment Service", or "Authentication Controller".

    Examples
    <SfDiagramComponent Height="600px" Model="@umlModel">
    </SfDiagramComponent>
    @code
    {
        UmlSequenceDiagramModel umlModel;
        protected override void OnInitialized()
        {
        umlModel = new UmlSequenceDiagramModel()
        {
            Participants = new List<UmlSequenceParticipant>()
            {
                new UmlSequenceParticipant()
                {
                    ID = "User",
                    Content= "User"
                },
                new UmlSequenceParticipant()
                {
                    ID = "Server",
                    Content= "Server"
                }
            }
            };
        }
    }

    ID

    Gets or sets the unique identifier for the participant. This identifier serves as the primary key for referencing the participant throughout the sequence diagram model.

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    A System.String representing the unique ID of the participant. This ID is used to reference the participant in messages (FromParticipantID, ToParticipantID), activation boxes, and fragments. The ID must be unique within the sequence diagram and should follow standard naming conventions. The default value is an empty string.

    Remarks

    The ID is case-sensitive and should be descriptive yet concise. Common naming patterns include PascalCase (e.g., "UserService") or descriptive names (e.g., "DatabaseServer").

    Examples
    <SfDiagramComponent Height="600px" Model="@umlModel">
    </SfDiagramComponent>
    @code
    {
        UmlSequenceDiagramModel umlModel;
        protected override void OnInitialized()
        {
        umlModel = new UmlSequenceDiagramModel()
        {
            Participants = new List<UmlSequenceParticipant>()
            {
                new UmlSequenceParticipant()
                {
                    ID = "User",
                    Content= "User"
                },
                new UmlSequenceParticipant()
                {
                    ID = "Server",
                    Content= "Server"
                }
            }
            };
        }
    }

    IsActor

    Gets or sets a value indicating whether the participant is an actor (stick figure) in the UML sequence diagram. Actors represent external entities that interact with the system, such as users, external systems, or services.

    Declaration
    public bool IsActor { get; set; }
    Property Value
    Type Description
    System.Boolean

    A System.Boolean value that determines the visual representation of the participant. When true, the participant is rendered as an actor with a stick figure icon in the header. When false, the participant is rendered as an object with a rectangular header box. The default value is false.

    Remarks

    In UML sequence diagrams, actors typically represent:

    • Human users interacting with the system
    • External systems or services
    • Hardware devices or sensors
    • Time-based triggers or schedulers
    Objects (non-actors) represent internal system components like classes, services, databases, or controllers. The visual distinction helps identify the system boundary and clarifies which entities are external to the system being modeled.
    Examples
    <SfDiagramComponent Height="600px" Model="@umlModel">
    </SfDiagramComponent>
    @code
    {
        UmlSequenceDiagramModel umlModel;
        protected override void OnInitialized()
        {
        umlModel = new UmlSequenceDiagramModel()
        {
            Participants = new List<UmlSequenceParticipant>()
            {
                new UmlSequenceParticipant()
                {
                    ID = "User",
                    Content= "User",
                    IsActor= true
                },
                new UmlSequenceParticipant()
                {
                    ID = "Server",
                    Content= "Server",
                    IsActor= false
                }
            }
            };
        }
    }

    ShowDestructionMarker

    Gets or sets a value indicating whether to display a destruction (cross) marker at the end of the participant's lifeline. The destruction marker indicates that the participant object is destroyed or goes out of scope at that point in the sequence execution.

    Declaration
    public bool ShowDestructionMarker { get; set; }
    Property Value
    Type Description
    System.Boolean

    A System.Boolean value that controls the display of the destruction marker. When true, a cross (X) symbol is rendered at the bottom of the participant's lifeline to indicate object destruction or termination. When false, the lifeline ends normally without any destruction indication. The default value is false.

    Remarks

    In UML sequence diagrams, destruction markers are used to show when:

    • An object is explicitly destroyed or deleted
    • A temporary object goes out of scope
    • A connection or session is terminated
    • A process or thread ends execution
    The destruction marker is typically placed after the last message involving the participant and helps clarify the object's lifecycle within the sequence scenario.
    Examples
    <SfDiagramComponent Height="600px" Model="@umlModel">
    </SfDiagramComponent>
    @code
    {
        UmlSequenceDiagramModel umlModel;
        protected override void OnInitialized()
        {
        umlModel = new UmlSequenceDiagramModel()
        {
            Participants = new List<UmlSequenceParticipant>()
            {
                new UmlSequenceParticipant()
                {
                    ID = "User",
                    Content= "User",
                    ShowDestructionMarker= true
                },
                new UmlSequenceParticipant()
                {
                    ID = "Server",
                    Content= "Server",
                    ShowDestructionMarker= true
                }
            }
            };
        }
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved