ExtensionMethods.GetAnnotationValue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
The requested annotation, if it exists. Otherwise, null.
Remarks
Strongly-typed wrappers for unnamed annotations keyed by CLR type.