Share via


StandardModelingAdapter.GetElementId Method

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.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Integration.11.0.dll)

Syntax

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

Parameters

Return Value

Type: 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)

.NET Framework Security

See Also

Reference

StandardModelingAdapter Class

Microsoft.VisualStudio.Modeling.Integration Namespace