StandardModelingAdapter.GetElementId 方法

获取指向 ModelElement 的 Element ID 链接。 该元素 Id 将用于生成模型元素的 modelbus 引用

命名空间:  Microsoft.VisualStudio.Modeling.Integration
程序集:  Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0.dll 中)

语法

声明
Protected Overridable Function GetElementId ( _
    mel As ModelElement _
) As String
protected virtual string GetElementId(
    ModelElement mel
)

参数

返回值

类型:System.String
唯一表示由适配器管理的对象之间的 ModelElement 字符串

备注

运行良好的默认实现返回值 <code>mel.Id.ToString()</code>,如果 <c>SerializeId</c> 属性与此 <c>XMLClassData</c> 是其他用例的 </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> (不是默认值) 适配器作者应该提供唯一 ID (例如标记)

.NET Framework 安全性

请参阅

参考

StandardModelingAdapter 类

Microsoft.VisualStudio.Modeling.Integration 命名空间