Share via


EdmDirectValueAnnotationsManager Class

Definition

Direct-value annotations manager provides services for setting and getting transient annotations on elements.

public class EdmDirectValueAnnotationsManager : Microsoft.OData.Edm.Vocabularies.IEdmDirectValueAnnotationsManager
type EdmDirectValueAnnotationsManager = class
    interface IEdmDirectValueAnnotationsManager
Public Class EdmDirectValueAnnotationsManager
Implements IEdmDirectValueAnnotationsManager
Inheritance
EdmDirectValueAnnotationsManager
Implements

Remarks

An object representing transient annotations is in one of these states: 1) Null, if the element has no transient annotations. 2) An EdmVocabularyAnnotation, if the element has exactly one annotation. 3) A list of EdmVocabularyAnnotation, if the element has more than one annotation. If the speed of annotation lookup for elements with many annotations becomes a concern, another option including a dictionary is possible.

Constructors

EdmDirectValueAnnotationsManager()

Initializes a new instance of the EdmDirectValueAnnotationsManager class.

Methods

GetAnnotationValue(IEdmElement, String, String)

Retrieves an annotation value for an EDM element. Returns null if no annotation with the given name exists for the given element.

GetAnnotationValues(IEnumerable<IEdmDirectValueAnnotationBinding>)

Retrieves a set of annotation values. For each requested value, returns null if no annotation with the given name exists for the given element.

GetAttachedAnnotations(IEdmElement)

Retrieves the annotations that are directly attached to an element.

GetDirectValueAnnotations(IEdmElement)

Gets annotations associated with an element.

SetAnnotationValue(IEdmElement, String, String, Object)

Sets an annotation value for an EDM element. If the value is null, no annotation is added and an existing annotation with the same name is removed.

SetAnnotationValues(IEnumerable<IEdmDirectValueAnnotationBinding>)

Sets a set of annotation values. If a supplied value is null, no annotation is added and an existing annotation with the same name is removed.

Applies to