Share via


UmlExtensions.AddReference Method (IElement, String, String, Boolean)

 

Links a string to an element, usually where the string is a reference such as a URI, modelbus reference, or work item ID. Use the name to indicate the type of reference. Returns an IReference object that represents the link.

Namespace:   Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml
Assembly:  Microsoft.VisualStudio.ArchitectureTools.Extensibility (in Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll)

Syntax

public static IReference AddReference(
    this IElement element,
    string name,
    string value,
    bool allowMultiple
)
public:
[ExtensionAttribute]
static IReference^ AddReference(
    IElement^ element,
    String^ name,
    String^ value,
    bool allowMultiple
)
static member AddReference : 
        element:IElement *
        name:string *
        value:string *
        allowMultiple:bool -> IReference
<ExtensionAttribute>
Public Shared Function AddReference (
    element As IElement,
    name As String,
    value As String,
    allowMultiple As Boolean
) As IReference

Parameters

  • name
    Type: System.String

    Tag that identifies the type of reference, and how the value is to be interpreted.

  • value
    Type: System.String

    String that identifies the target object.

  • allowMultiple
    Type: System.Boolean

    If true, more than one value with the same name can be attached to this IElement. If false, an exception will be thrown if a reference of this name is already attached to this IElement.

Return Value

Type: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml.IReference

See Also

UmlExtensions Class
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Uml Namespace

Return to top