共用方式為


StandardModelingAdapter.GetElementDisplayName 方法 (ModelElement)

 

可讓 DSL 作者決定特定模型項目之顯示名稱的擴充點

命名空間:   Microsoft.VisualStudio.Modeling.Integration
組件:  Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Integration.12.0.dll 中)

語法

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

參數

  • mel
    我們要計算顯示名稱的模型項目

傳回值

Type: System.String

包含 </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> 之顯示名稱的字串。

備註

這個方法要由 GetElementReference 呼叫以判斷顯示名稱的項目。如果這個方法會傳回 null 或空白,則為 <c>GetElementReference </c>will 使用網域類別的顯示名稱。

請參閱

StandardModelingAdapter 類別
Microsoft.VisualStudio.Modeling.Integration 命名空間

回到頁首