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-cn/library/bb384936(v=vs.103)https://msdn.microsoft.com/zh-cn/library/bb383977(v=vs.103)

请参阅

参考

ExtensionMethods 类

GetAnnotationValue 重载

Microsoft.Data.Edm 命名空间