ExtensionMethods.GetAnnotationValue Method

Definition

Overloads

GetAnnotationValue(IEdmModel, IEdmElement, String, String)

Gets an annotation value corresponding to the given namespace and name provided.

GetAnnotationValue<T>(IEdmModel, IEdmElement, String, String)

Gets an annotation value corresponding to the given namespace and name provided.

GetAnnotationValue<T>(IEdmModel, IEdmElement)

Gets an annotation value from an annotatable element.

GetAnnotationValue(IEdmModel, IEdmElement, String, String)

Gets an annotation value corresponding to the given namespace and name provided.

public static object GetAnnotationValue (this Microsoft.OData.Edm.IEdmModel model, Microsoft.OData.Edm.IEdmElement element, string namespaceName, string localName);
static member GetAnnotationValue : Microsoft.OData.Edm.IEdmModel * Microsoft.OData.Edm.IEdmElement * string * string -> obj
<Extension()>
Public Function GetAnnotationValue (model As IEdmModel, element As IEdmElement, namespaceName As String, localName As String) As Object

Parameters

model
IEdmModel

The model containing the annotation.

element
IEdmElement

The annotated element.

namespaceName
String

Namespace of the annotation.

localName
String

Name of the annotation inside the namespace.

Returns

The requested annotation value, if it exists. Otherwise, null.

Applies to

GetAnnotationValue<T>(IEdmModel, IEdmElement, String, String)

Gets an annotation value corresponding to the given namespace and name provided.

public static T GetAnnotationValue<T> (this Microsoft.OData.Edm.IEdmModel model, Microsoft.OData.Edm.IEdmElement element, string namespaceName, string localName) where T : class;
static member GetAnnotationValue : Microsoft.OData.Edm.IEdmModel * Microsoft.OData.Edm.IEdmElement * string * string -> 'T (requires 'T : null)
<Extension()>
Public Function GetAnnotationValue(Of T As Class) (model As IEdmModel, element As IEdmElement, namespaceName As String, localName As String) As T

Type Parameters

T

Type of the annotation being returned.

Parameters

model
IEdmModel

The model containing the annotation.

element
IEdmElement

The annotated element.

namespaceName
String

Namespace of the annotation.

localName
String

Name of the annotation inside the namespace.

Returns

T

The requested annotation value, if it exists. Otherwise, null.

Applies to

GetAnnotationValue<T>(IEdmModel, IEdmElement)

Gets an annotation value from an annotatable element.

public static T GetAnnotationValue<T> (this Microsoft.OData.Edm.IEdmModel model, Microsoft.OData.Edm.IEdmElement element) where T : class;
static member GetAnnotationValue : Microsoft.OData.Edm.IEdmModel * Microsoft.OData.Edm.IEdmElement -> 'T (requires 'T : null)
<Extension()>
Public Function GetAnnotationValue(Of T As Class) (model As IEdmModel, element As IEdmElement) As T

Type Parameters

T

Type of the annotation being returned.

Parameters

model
IEdmModel

The model containing the annotation.

element
IEdmElement

The annotated element.

Returns

T

The requested annotation, if it exists. Otherwise, null.

Remarks

Strongly-typed wrappers for unnamed annotations keyed by CLR type.

Applies to