alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ClassifierMultiplicity

    Represents multiplicity information for a UML relationship.

    Inheritance
    object
    DiagramObject
    ClassifierMultiplicity
    Implements
    IDiagramObject
    ICloneable
    Inherited Members
    DiagramObject.GetParent()
    DiagramObject.OnPropertyChanged(string, object, object, IDiagramObject)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.Diagram.dll
    Syntax
    public class ClassifierMultiplicity : DiagramObject, IDiagramObject, ICloneable
    Remarks

    Stores the multiplicity labels for both the source and target ends of a connector.

    It contains two MultiplicityLabel objects: Source and Target, representing the multiplicity at each endpoint of a Connector.

    Examples
    connectors.Add(new Connector()
    {
        ID = "connector1",
        SourcePoint = new DiagramPoint() { X = 100, Y = 200 },
        TargetPoint = new DiagramPoint() { X = 300, Y = 200 },
        Type = ConnectorSegmentType.Straight,
        Shape = new RelationShip()
        {
            RelationshipShape = Relationship.Association,
            Multiplicity = new ClassifierMultiplicity()
            {
                Source = new MultiplicityLabel()
                {
                    LowerBounds = "1",
                    UpperBounds = "1"
                },
                Target = new MultiplicityLabel()
                {
                    LowerBounds = "0",
                    UpperBounds = "*"
                }
            }
        }
    });

    Constructors

    ClassifierMultiplicity()

    Initializes a new instance of ClassifierMultiplicity.

    Declaration
    public ClassifierMultiplicity()

    ClassifierMultiplicity(ClassifierMultiplicity)

    Initializes a new instance of ClassifierMultiplicity copied from src.

    Declaration
    public ClassifierMultiplicity(ClassifierMultiplicity src)
    Parameters
    Type Name Description
    ClassifierMultiplicity src

    Properties

    Source

    Gets or sets the multiplicity label for the source end of the relationship connector.

    Declaration
    [JsonPropertyName("source")]
    public MultiplicityLabel Source { get; set; }
    Property Value
    Type Description
    MultiplicityLabel

    A MultiplicityLabel representing the source cardinality.

    Remarks

    This property defines how many instances of the source element can participate in the relationship.

    It is displayed near the starting point of the connector.

    Examples

    This example demonstrates setting the source multiplicity:

    connectors.Add(new Connector()
    {
        ID = "connector2",
        SourcePoint = new DiagramPoint() { X = 150, Y = 250 },
        TargetPoint = new DiagramPoint() { X = 350, Y = 250 },
        Shape = new RelationShip()
        {
            RelationshipShape = Relationship.Dependency,
            Multiplicity = new ClassifierMultiplicity()
            {
                Source = new MultiplicityLabel()
                {
                    LowerBounds = "1",
                    UpperBounds = "*"
                }
            }
        }
    });

    Target

    Gets or sets the multiplicity label for the target end of the relationship connector.

    Declaration
    [JsonPropertyName("target")]
    public MultiplicityLabel Target { get; set; }
    Property Value
    Type Description
    MultiplicityLabel

    A MultiplicityLabel representing the target cardinality.

    Remarks

    This property defines how many instances of the target element can be associated with a single source element.

    It is displayed near the end point of the connector.

    Examples

    This example demonstrates setting the target multiplicity:

    connectors.Add(new Connector()
    {
        ID = "connector3",
        SourcePoint = new DiagramPoint() { X = 200, Y = 300 },
        TargetPoint = new DiagramPoint() { X = 400, Y = 300 },
        Shape = new RelationShip()
        {
            RelationshipShape = Relationship.Association,
            Multiplicity = new ClassifierMultiplicity()
            {
                Target = new MultiplicityLabel()
                {
                    LowerBounds = "0",
                    UpperBounds = "1"
                }
            }
        }
    });

    Methods

    Clone()

    Creates a new object that is a copy of the current ClassifierMultiplicity.

    Declaration
    public override object Clone()
    Returns
    Type
    object
    Overrides
    DiagramObject.Clone()

    Implements

    IDiagramObject
    ICloneable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved