alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class UmlClassMethod

    Represents a method (operation) in a UML class.

    Inheritance
    object
    DiagramObject
    NodeBase
    UmlTypedElement
    UmlClassAttribute
    UmlClassMethod
    Implements
    IDiagramObject
    ICloneable
    Inherited Members
    DiagramObject.GetParent()
    DiagramObject.OnPropertyChanged(string, object, object, IDiagramObject)
    NodeBase.AdditionalInfo
    NodeBase.CanAutoLayout
    NodeBase.Flip
    NodeBase.FlipMode
    NodeBase.ID
    NodeBase.IsVisible
    NodeBase.Margin
    NodeBase.SearchTags
    NodeBase.Tooltip
    NodeBase.ZIndex
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    UmlClassAttribute.IsSeparator
    UmlClassAttribute.Scope
    UmlClassAttribute.SeparatorStyle
    UmlTypedElement.Name
    UmlTypedElement.Style
    UmlTypedElement.Type
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.Diagram.dll
    Syntax
    public class UmlClassMethod : UmlClassAttribute, IDiagramObject, ICloneable
    Remarks

    This extends a typed UML element and includes support for parameters and return type, along with visibility scope and optional separator behavior.

    Examples
    nodes.Add(new Node()
    {
        Shape = new UmlClassifierShape()
        {
            Classifier = ClassifierShape.Class,
            ClassShape = new UmlClass()
            {
                Name = "MathService",
                Methods = new DiagramObjectCollection<UmlClassMethod>()
                {
                    new UmlClassMethod()
                    {
                        Name = "Multiply",
                        Type = "int",
                        Scope = UmlScope.Public,
                        Parameters = new DiagramObjectCollection<UmlTypedElement>()
                        {
                            new UmlTypedElement() { Name = "a", Type = "int" },
                            new UmlTypedElement() { Name = "b", Type = "int" }
                        }
                    }
                }
            }
        }
    });

    Constructors

    UmlClassMethod()

    Creates a new instance of the UmlClassMethod.

    Declaration
    public UmlClassMethod()

    UmlClassMethod(UmlClassMethod)

    Creates a new instance of the UmlClassMethod.

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

    Source instance

    Properties

    Parameters

    Gets or sets the collection of parameters for the method.

    Declaration
    [JsonPropertyName("parameters")]
    public DiagramObjectCollection<UmlTypedElement> Parameters { get; set; }
    Property Value
    Type Description
    DiagramObjectCollection<UmlTypedElement>

    A DiagramObjectCollection<T> representing the method parameters.

    Remarks

    Each parameter is defined with a name, type, and optional text styling.

    Examples

    This example demonstrates how to define a method with parameters in a UML class node:

    nodes.Add(new Node()
    {
        Shape = new UmlClassifierShape()
        {
            Classifier = ClassifierShape.Class,
            ClassShape = new UmlClass()
            {
                Name = "Calculator",
                Methods = new DiagramObjectCollection<UmlClassMethod>()
                {
                    new UmlClassMethod()
                    {
                        Name = "Add",
                        Type = "int",
                        Scope = UmlScope.Public,
                        Parameters = new DiagramObjectCollection<UmlTypedElement>()
                        {
                            new UmlTypedElement() { Name = "x", Type = "int" },
                            new UmlTypedElement() { Name = "y", Type = "int" }
                        }
                    }
                }
            }
        }
    });

    Methods

    Clone()

    This method releasing all unmanaged resources.

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

    Implements

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