ExtensionMethods Class

Definition

Contains extension methods for IEdmModel interfaces.

public static class ExtensionMethods
type ExtensionMethods = class
Public Module ExtensionMethods
Inheritance
ExtensionMethods

Methods

AddAlternateKeyAnnotation(EdmModel, IEdmEntityType, IDictionary<String,IEdmProperty>)

Adds the alternate keys to this entity type.

AddComplexType(EdmModel, String, String)

Creates and adds a complex type to the model.

AddComplexType(EdmModel, String, String, IEdmComplexType)

Creates and adds a complex type to the model.

AddComplexType(EdmModel, String, String, IEdmComplexType, Boolean)

Creates and adds a complex type to the model.

AddComplexType(EdmModel, String, String, IEdmComplexType, Boolean, Boolean)

Creates and adds a complex type to the model.

AddEntityContainer(EdmModel, String, String)

Creates and adds an entity container to the model.

AddEntityType(EdmModel, String, String)

Creates and adds an entity type to the model.

AddEntityType(EdmModel, String, String, IEdmEntityType)

Creates and adds an entity type to the model.

AddEntityType(EdmModel, String, String, IEdmEntityType, Boolean, Boolean)

Creates and adds an entity type to the model.

AddEntityType(EdmModel, String, String, IEdmEntityType, Boolean, Boolean, Boolean)

Creates and adds an entity type to the model.

AddTerm(EdmModel, String, String, EdmPrimitiveTypeKind)

Creates and adds a new instance of the EdmTerm class from a primitive type kind.

AddTerm(EdmModel, String, String, IEdmTypeReference)

Creates and adds a new instance of the EdmTerm class from a type reference.

AddTerm(EdmModel, String, String, IEdmTypeReference, String, String)

Creates and adds a new instance of the EdmTerm class from a type reference.

AllElements(IEdmEntityContainer, Int32)
AsElementType(IEdmType)

Gets the element type of a collection definition or itself of a non-collection definition referred to by the type reference.

BaseComplexType(IEdmComplexType)

Gets the base type of this references definition.

BaseComplexType(IEdmComplexTypeReference)

Gets the base type of this reference.

BaseEntityType(IEdmEntityType)

Gets the base type of this entity type definition.

BaseEntityType(IEdmEntityTypeReference)

Gets the base type of the definition of this reference.

BaseType(IEdmStructuredType)

Gets the base type of this structured type definition.

BaseType(IEdmStructuredTypeReference)

Returns the base type of the definition of this reference.

CollectionDefinition(IEdmCollectionTypeReference)

Gets the definition of this collection reference.

ComplexDefinition(IEdmComplexTypeReference)

Gets the definition of this reference typed as an IEdmComplexTypeDefinition.

DeclaredNavigationProperties(IEdmStructuredType)

Gets the navigation properties declared in this structured type definition.

DeclaredNavigationProperties(IEdmStructuredTypeReference)

Gets the navigation properties declared in the definition of this reference.

DeclaredStructuralProperties(IEdmStructuredType)

Gets all structural properties declared in the IEdmStructuredTypeDefinition.

DeclaredStructuralProperties(IEdmStructuredTypeReference)

Gets all structural properties declared in the definition of this reference.

DeclaringEntityType(IEdmNavigationProperty)

Gets the entity type declaring this navigation property.

DependentProperties(IEdmNavigationProperty)

Gets the dependent properties of this navigation property, returning null if this is the principal entity or if there is no referential constraint.

DirectValueAnnotations(IEdmModel, IEdmElement)

Gets the direct annotations for an element.

ElementType(IEdmCollectionTypeReference)

Gets the element type of the definition of this collection reference.

EntityDefinition(IEdmEntityTypeReference)

Gets the definition of this entity reference.

EntityReferenceDefinition(IEdmEntityReferenceTypeReference)

Gets the definition of this entity reference type reference.

EntitySets(IEdmEntityContainer)

Returns entity sets belonging to an IEdmEntityContainer.

EntityType(IEdmEntityReferenceTypeReference)

Gets the entity type referred to by the definition of this entity reference type reference.

EntityType(IEdmNavigationSource)

Return the entity type of the navigation source.

EnumDefinition(IEdmEnumTypeReference)

Gets the definition of this enumeration reference.

ExistsContainer(IEdmModel, String)

If the container name in the model is the same as the input name. The input name maybe full qualified name.

FilterByName(IEnumerable<IEdmOperation>, Boolean, String)

Checks whether all operations have the same return type

FindAllDerivedTypes(IEdmModel, IEdmStructuredType)

Finds a list of types that derive from the supplied type directly or indirectly, and across models.

FindBoundOperations(IEdmModel, IEdmType)

Searches for bound operations based on the binding type, returns an empty enumerable if no operation exists.

FindBoundOperations(IEdmModel, String, IEdmType)

Searches for bound operations based on the qualified name and binding type, returns an empty enumerable if no operation exists.

FindDeclaredEntitySet(IEdmModel, String)

Searches for entity set by the given name that may be container qualified in default container and .Extends containers.

FindDeclaredNavigationSource(IEdmModel, String)

Searches for entity set or singleton by the given name that may be container qualified in default container and .Extends containers. If no container name is provided, then default container will be searched.

FindDeclaredOperationImports(IEdmModel, String)

Searches for the operation imports by the specified name in default container and .Extends containers, returns an empty enumerable if no operation import exists.

FindDeclaredSingleton(IEdmModel, String)

Searches for singleton by the given name that may be container qualified in default container and .Extends containers. If no container name is provided, then default container will be searched.

FindEntityContainer(IEdmModel, String)

Searches for an entity container with the given name in this model and all referenced models and returns null if no such entity container exists.

FindNavigationProperty(IEdmStructuredTypeReference, String)

Finds a navigation property declared in the definition of this reference by name.

FindOperations(IEdmModel, String)

Searches for operations with the given name in this model and all referenced models and returns an empty enumerable if no such operations exist.

FindProperty(IEdmRecordExpression, String)

Finds a property of a record expression.

FindProperty(IEdmStructuredTypeReference, String)

Finds a property from the definition of this reference.

FindTerm(IEdmModel, String)

Searches for a term with the given name in this model and all referenced models and returns null if no such term exists.

FindType(IEdmModel, String)

Searches for a type with the given name in this model and all referenced models and returns null if no such type exists.

FindVocabularyAnnotations(IEdmModel, IEdmVocabularyAnnotatable)

Gets an annotatable element's vocabulary annotations defined in a specific model and models referenced by that model.

FindVocabularyAnnotations<T>(IEdmModel, IEdmVocabularyAnnotatable, IEdmTerm)

Gets an annotatable element's vocabulary annotations that bind a particular term.

FindVocabularyAnnotations<T>(IEdmModel, IEdmVocabularyAnnotatable, IEdmTerm, String)

Gets an annotatable element's vocabulary annotations that bind a particular term.

FindVocabularyAnnotations<T>(IEdmModel, IEdmVocabularyAnnotatable, String)

Gets an annotatable element's vocabulary annotations that bind a particular term.

FindVocabularyAnnotations<T>(IEdmModel, IEdmVocabularyAnnotatable, String, String)

Gets an annotatable element's vocabulary annotations that bind a particular term.

FindVocabularyAnnotationsIncludingInheritedAnnotations(IEdmModel, IEdmVocabularyAnnotatable)

Gets an annotatable element's vocabulary annotations defined in a specific model and models referenced by that model.

FullName(IEdmSchemaElement)

Gets the full name of the element.

FullName(IEdmTypeReference)

Gets the full name of the definition referred to by the type reference.

FullNavigationSourceName(IEdmNavigationSource)

Returns the fully qualified name of a navigation source.

FullTypeName(IEdmType)

Gets the full name of the definition referred to by the type reference.

GetAlternateKeysAnnotation(IEdmModel, IEdmEntityType)

Gets the declared alternate keys of the most defined entity with a declared key present.

GetAnnotationValue(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<T>(IEdmModel, IEdmElement, String, String)

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

GetAnnotationValues(IEdmModel, 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.

GetDerivedTypeConstraints(IEdmModel, IEdmNavigationSource)

Gets the collection of qualified type name for term Org.OData.Validation.V1.DerivedTypeConstraint from a navigation source.

GetDerivedTypeConstraints(IEdmModel, IEdmVocabularyAnnotatable)

Gets the collection of qualified type name for term Org.OData.Validation.V1.DerivedTypeConstraint from a target annotatable.

GetDescriptionAnnotation(IEdmModel, IEdmVocabularyAnnotatable)

Gets description for term Org.OData.Core.V1.Description from a target annotatable

GetEdmReferences(IEdmModel)

Gets edmx:Reference information (IEdmReference) from the model.

GetEdmVersion(IEdmModel)

Gets the value for the EDM version of the model.

GetLongDescriptionAnnotation(IEdmModel, IEdmVocabularyAnnotatable)

Gets description for term Org.OData.Core.V1.LongDescription from a target annotatable

GetPartnerPath(IEdmNavigationProperty)

Gets the partner path of a navigation property.

GetPrimitiveValueConverter(IEdmModel, IEdmTypeReference)

Get the primitive value converter for the given type definition in the model.

GetReturn(IEdmOperation)

Gets the IEdmOperationReturn from the specified operation.

GetTermValue(IEdmModel, IEdmStructuredValue, IEdmTerm, EdmExpressionEvaluator)

Gets the IEdmValue of a vocabulary term that has been applied to the type of a value.

GetTermValue(IEdmModel, IEdmStructuredValue, IEdmTerm, String, EdmExpressionEvaluator)

Gets the IEdmValue of a vocabulary term that has been applied to the type of a value.

GetTermValue(IEdmModel, IEdmStructuredValue, String, EdmExpressionEvaluator)

Gets the IEdmValue of a vocabulary term that has been applied to the type of a value.

GetTermValue(IEdmModel, IEdmStructuredValue, String, String, EdmExpressionEvaluator)

Gets the IEdmValue of a vocabulary term that has been applied to the type of a value.

GetTermValue(IEdmModel, IEdmVocabularyAnnotatable, IEdmTerm, EdmExpressionEvaluator)

Gets the IEdmValue of a vocabulary term that has been applied to an element.

GetTermValue(IEdmModel, IEdmVocabularyAnnotatable, IEdmTerm, String, EdmExpressionEvaluator)

Gets the IEdmValue of a vocabulary term that has been applied to an element.

GetTermValue(IEdmModel, IEdmVocabularyAnnotatable, String, EdmExpressionEvaluator)

Gets the IEdmValue of a vocabulary term that has been applied to an element.

GetTermValue(IEdmModel, IEdmVocabularyAnnotatable, String, String, EdmExpressionEvaluator)

Gets the IEdmValue of a vocabulary term that has been applied to an element.

GetTermValue<T>(IEdmModel, IEdmStructuredValue, IEdmTerm, EdmToClrEvaluator)

Gets the CLR value of a vocabulary term that has been applied to the type of a value.

GetTermValue<T>(IEdmModel, IEdmStructuredValue, IEdmTerm, String, EdmToClrEvaluator)

Gets the CLR value of a vocabulary term that has been applied to the type of a value.

GetTermValue<T>(IEdmModel, IEdmStructuredValue, String, EdmToClrEvaluator)

Gets the CLR value of a vocabulary term that has been applied to the type of a value.

GetTermValue<T>(IEdmModel, IEdmStructuredValue, String, String, EdmToClrEvaluator)

Gets the CLR value of a vocabulary term that has been applied to the type of a value.

GetTermValue<T>(IEdmModel, IEdmVocabularyAnnotatable, IEdmTerm, EdmToClrEvaluator)

Gets the CLR value of a vocabulary term that has been applied to an element.

GetTermValue<T>(IEdmModel, IEdmVocabularyAnnotatable, IEdmTerm, String, EdmToClrEvaluator)

Gets the CLR value of a vocabulary term that has been applied to an element.

GetTermValue<T>(IEdmModel, IEdmVocabularyAnnotatable, String, EdmToClrEvaluator)

Gets the CLR value of a vocabulary term that has been applied to an element.

GetTermValue<T>(IEdmModel, IEdmVocabularyAnnotatable, String, String, EdmToClrEvaluator)

Gets the CLR value of a vocabulary term that has been applied to an element.

GetUInt16(EdmModel, String, Boolean)

Get type reference to the default UInt16 type definition. The default underlying type is Microsoft.OData.Edm.PrimitiveValueConverterConstants.DefaultUInt16UnderlyingType. If the user has already defined his own UInt16, this method will not define anything and simply returns the type reference.

GetUInt32(EdmModel, String, Boolean)

Get type reference to the default UInt32 type definition. The default underlying type is Microsoft.OData.Edm.PrimitiveValueConverterConstants.DefaultUInt32UnderlyingType. If the user has already defined his own UInt32, this method will not define anything and simply returns the type reference.

GetUInt64(EdmModel, String, Boolean)

Get type reference to the default UInt64 type definition. The default underlying type is Microsoft.OData.Edm.PrimitiveValueConverterConstants.DefaultUInt64UnderlyingType. If the user has already defined his own UInt64, this method will not define anything and simply returns the type reference.

HasDeclaredKeyProperty(IEdmEntityType, IEdmProperty)

Checks whether the given entity type has the property as one of the key properties.

HasEquivalentBindingType(IEdmOperation, IEdmType)

Determines whether the bound operation's binding type is equivalent to the specified binding type.

IsAbstract(IEdmStructuredTypeReference)

Returns true if the definition of this reference is abstract.

IsAction(IEdmOperation)

Determines whether the specified operation is action.

IsActionImport(IEdmOperationImport)

Determines whether [is action import] [the specified operation import].

IsFunction(IEdmOperation)

Determines whether the specified operation is function.

IsFunctionImport(IEdmOperationImport)

Determines whether [is function import] [the specified operation import].

IsKey(IEdmProperty)

Determines whether the specified property is a key for its contained type.

IsOpen(IEdmStructuredTypeReference)

Returns true if the definition of this reference is open.

IsOpen(IEdmType)

Returns true if the definition of this reference is open.

IsPrincipal(IEdmNavigationProperty)

Gets whether this navigation property originates at the principal end of an association.

Key(IEdmEntityType)

Gets the declared key of the most defined entity with a declared key present.

Key(IEdmEntityTypeReference)

Gets the entity key of the definition of this reference.

Location(IEdmElement)

Gets the location of this element.

NavigationProperties(IEdmStructuredType)

Get the navigation properties declared in this structured type and all base types.

NavigationProperties(IEdmStructuredTypeReference)

Gets the navigation properties declared in the definition of this reference and its base types.

NavigationSourceKind(IEdmNavigationSource)

Return the navigation kind of the navigation source.

OperationImports(IEdmEntityContainer)

Returns operation imports belonging to an IEdmEntityContainer.

PrimitiveDefinition(IEdmPrimitiveTypeReference)

Gets the definition of this primitive type reference.

PrimitiveKind(IEdmPrimitiveTypeReference)

Gets the primitive kind of the definition referred to by this type reference.

PrincipalProperties(IEdmNavigationProperty)

Gets the principal properties of this navigation property, returning null if this is the principal entity or if there is no referential constraint.

Properties(IEdmStructuredType)

Gets all properties of the structured type definition and its base types.

SchemaElementsAcrossModels(IEdmModel)

Gets all schema elements from the model, and models referenced by it.

SetAnnotationValue(IEdmModel, 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.

SetAnnotationValue<T>(IEdmModel, IEdmElement, T)

Sets an annotation value on an annotatable element.

SetAnnotationValues(IEdmModel, 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.

SetChangeTrackingAnnotation(EdmModel, IEdmEntityContainer, Boolean)

Set Org.OData.Capabilities.V1.ChangeTracking to target.

SetChangeTrackingAnnotation(EdmModel, IEdmEntitySet, Boolean, IEnumerable<IEdmStructuralProperty>, IEnumerable<IEdmNavigationProperty>)

Set Org.OData.Capabilities.V1.ChangeTracking to target.

SetDescriptionAnnotation(EdmModel, IEdmVocabularyAnnotatable, String)

Set Org.OData.Core.V1.Description to target.

SetEdmReferences(IEdmModel, IEnumerable<IEdmReference>)

Sets edmx:Reference information (IEdmReference) to the model.

SetEdmVersion(IEdmModel, Version)

Sets a value of EDM version attribute of the model.

SetLongDescriptionAnnotation(EdmModel, IEdmVocabularyAnnotatable, String)

Set Org.OData.Core.V1.LongDescription to target.

SetOptimisticConcurrencyAnnotation(EdmModel, IEdmEntitySet, IEnumerable<IEdmStructuralProperty>)

Set annotation Org.OData.Core.V1.OptimisticConcurrency to EntitySet

SetPrimitiveValueConverter(IEdmModel, IEdmTypeDefinitionReference, IPrimitiveValueConverter)

Set the primitive value converter for the given type definition in the model.

ShortQualifiedName(IEdmSchemaElement)

Gets the Short Qualified name of the element.

ShortQualifiedName(IEdmTypeReference)

Gets the short qualified name of the definition referred to by the type reference.

Singletons(IEdmEntityContainer)

Returns singletons belonging to an IEdmEntityContainer.

StructuralProperties(IEdmStructuredType)

Gets the structural properties declared in this type definition and all base types.

StructuralProperties(IEdmStructuredTypeReference)

Gets all structural properties declared in the definition of this reference and all its base types.

StructuredDefinition(IEdmStructuredTypeReference)

Gets the definition of this structured type reference.

TargetMultiplicity(IEdmNavigationProperty)

Gets the multiplicity of the target of this navigation.

Term(IEdmVocabularyAnnotation)

Gets the term of this annotation.

ToEntityType(IEdmNavigationProperty)

Gets the entity type targeted by this navigation property.

ToStructuredType(IEdmTypeReference)

Gets the structured type targeted by this structural property type reference.

TryFindContainerQualifiedEntitySet(IEdmModel, String, IEdmEntitySet)

Finds the entity set with qualified entity set name (not simple entity set name).

TryFindContainerQualifiedOperationImports(IEdmModel, String, IEnumerable<IEdmOperationImport>)

Tries the find container qualified operation imports.

TryFindContainerQualifiedSingleton(IEdmModel, String, IEdmSingleton)

Finds the singleton.

TryGetRelativeEntitySetPath(IEdmOperation, IEdmModel, IEdmOperationParameter, Dictionary<IEdmNavigationProperty,IEdmPathExpression>, IEdmEntityType, IEnumerable<EdmError>)

Tries to get the relative entity set path.

TryGetRelativeEntitySetPath(IEdmOperationImport, IEdmModel, IEdmOperationParameter, Dictionary<IEdmNavigationProperty,IEdmPathExpression>, IEnumerable<EdmError>)

Analyzes IEdmOperationImport.EntitySet expression and returns a relative path to an IEdmEntitySet if available. The path starts with the parameter and may have optional sequence of IEdmNavigationProperty and type casts segments.

TryGetStaticEntitySet(IEdmOperationImport, IEdmModel, IEdmEntitySetBase)

Analyzes IEdmOperationImport.EntitySet expression and returns a static IEdmEntitySet reference if available.

TypeDefinition(IEdmTypeDefinitionReference)

Gets the definition of this type definition reference.

TypeKind(IEdmTypeReference)

Gets the type kind of the type references definition.

VocabularyAnnotations(IEdmVocabularyAnnotatable, IEdmModel)

Gets an annotatable element's vocabulary annotations as seen from a particular model.

Applies to