Share via


StandardModelingAdapter.GetElementId Method (ModelElement)

 

Get the Element Id of a ModelElement. This element Id will be used to build the modelbus reference of the model element

Namespace:   Microsoft.VisualStudio.Modeling.Integration
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0.dll)

Syntax

protected virtual string GetElementId(
    ModelElement mel
)
protected:
virtual String^ GetElementId(
    ModelElement^ mel
)
abstract GetElementId : 
        mel:ModelElement -> string
override GetElementId : 
        mel:ModelElement -> string
Protected Overridable Function GetElementId (
    mel As ModelElement
) As String

Parameters

Return Value

Type: System.String

A string representing uniquely the ModelElement among the objects managed by the Adapter

Remarks

The default implementation return <code>mel.Id.ToString()</code> which is fine if the <c>SerializeId</c> property of the <c>XMLClassData</c> associated with the DomainClass of this </w:t></w:r><w:r><w:rPr><w:rStyle w:val="ParameterReference"/></w:rPr><w:t>mel</w:t></w:r><w:r><w:t> is <c>true</c> (which is not the default) For other cases, the Adapter author should provide a unique Id (such as the moniker)

See Also

StandardModelingAdapter Class
Microsoft.VisualStudio.Modeling.Integration Namespace

Return to top