StandardModelingAdapter.GetElementId 方法
取得項目 Id 的 ModelElement。這個項目 Id 將會用來建置 modelbus 的參考模型項目
命名空間: Microsoft.VisualStudio.Modeling.Integration
組件: Microsoft.VisualStudio.Modeling.Sdk.Integration.11.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Integration.11.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> SerializeId </c> <c> XMLClassData </c> 的屬性 相關聯的這 DomainClass </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> 為 <c> true </c> (這不是預設值)其他情況下,配接器的作者應提供一個唯一的 Id (例如 moniker)
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。