StandardModelingAdapter.GetElementId 方法
取得 ModelElement 的項目 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
)
參數
- mel
類型:Microsoft.VisualStudio.Modeling.ModelElement
我們要求項目 Id 的 ModelElement
傳回值
類型:System.String
在配接器所管理之物件當中唯一表示 ModelElement 的字串。
備註
可正常是的預設實作會傳回 <code>mel.Id.ToString()</code>,如果 <c>XMLClassData</c> 的 <c>SerializeId</c> 屬性與這個 </w:t></w:r> </w:rPr><w:r><w:rPr><w:rStyle w:val="ParameterReference" /><w:t><w:r><w:t> mel</w:t></w:r> DomainClass 是其他 case 的 <c>(不是預設值) 的 true</c>,配接器作者應該提供唯一的 ID (例如 moniker)
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。