共用方式為


ExtensionMethods.GetAnnotationValue<T> 方法 (IEdmModel, IEdmElement, String, String)

取得對應至指定之命名空間及提供之名稱的註釋值。

命名空間:  Microsoft.Data.Edm
組件:  Microsoft.Data.Edm (在 Microsoft.Data.Edm.dll 中)

語法

'宣告
<ExtensionAttribute> _
Public Shared Function GetAnnotationValue(Of T As Class) ( _
    model As IEdmModel, _
    element As IEdmElement, _
    namespaceName As String, _
    localName As String _
) As T
'用途
Dim model As IEdmModel
Dim element As IEdmElement
Dim namespaceName As String
Dim localName As String
Dim returnValue As T

returnValue = model.GetAnnotationValue(element, _
    namespaceName, localName)
public static T GetAnnotationValue<T>(
    this IEdmModel model,
    IEdmElement element,
    string namespaceName,
    string localName
)
where T : class
[ExtensionAttribute]
public:
generic<typename T>
where T : ref class
static T GetAnnotationValue(
    IEdmModel^ model, 
    IEdmElement^ element, 
    String^ namespaceName, 
    String^ localName
)
static member GetAnnotationValue : 
        model:IEdmModel * 
        element:IEdmElement * 
        namespaceName:string * 
        localName:string -> 'T  when 'T : not struct
JScript 不支援泛型型別及方法。

型別參數

  • T
    所要傳回之註釋的型別。

參數

  • localName
    型別:System.String
    命名空間內的註釋名稱。

傳回值

型別:T
註釋值。

使用注意事項

在 Visual Basic 及 C# 中,您可以在任何型別 IEdmModel 的物件上將這個方法做為執行個體方法呼叫。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 https://msdn.microsoft.com/zh-tw/library/bb384936(v=vs.103)https://msdn.microsoft.com/zh-tw/library/bb383977(v=vs.103)

請參閱

參考

ExtensionMethods 類別

GetAnnotationValue 多載

Microsoft.Data.Edm 命名空間