Share via


ModelSchema Class

Represents the metadata that is required to instantiate a ModelStore.

Inheritance Hierarchy

System.Object
  Microsoft.Data.Schema.SchemaModel.ModelSchema

Namespace:  Microsoft.Data.Schema.SchemaModel
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

Syntax

'Declaration
Public NotInheritable Class ModelSchema
public sealed class ModelSchema
public ref class ModelSchema sealed
[<Sealed>]
type ModelSchema =  class end
public final class ModelSchema

The ModelSchema type exposes the following members.

Properties

  Name Description
Public property AnnotationClasses Gets a list of annotation metadata objects.
Public property ElementClasses
Public property MaxIdentifierPartLength Gets the maximum length of any part of a model identifier.
Public property MaxIdentifierParts Represents the maximum number of identifier parts that can be in a model identifier.
Public property RootParentElementClasses Gets all the element metadata objects that are root parents of any composed or hierarchical relationships for this model.
Public property Version Gets or sets the schema version.

Top

Methods

  Name Description
Public method AddAnnotationClass Adds an annotation class to this schema.
Public method AddElementClass Adds an element class to this schema.
Public method CreateIdentifierGroup Creates an identifier group.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method FindAnnotationClass(String) Finds and returns the annotation metadata object by name.
Public method FindAnnotationClass(Type) Returns the annotation metadata object that is associated with an annotation of the given type.
Public method FindElementClass(String) Finds and returns the element metadata object that has the matching name.
Public method FindElementClass(Type) Finds and returns the element metadata object for the element that implements the given type.
Public method GetAllLevelChildElementClasses
Public method GetAllLevelParentElementClasses
Public method GetChildElementClasses Gets a list of composed or hierarchical children of an element metadata object.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetImplementingElementClasses Returns the list of element metadata objects that are associated with elements that implement the given interface.
Public method GetInstantiatingAnnotationClass Returns the annotation metadata object that is used to instantiate the given type.
Public method GetInstantiatingElementClass Returns the element metadata object that is used to instantiate the given type.
Public method GetInstantiatingElementClassMapping Returns the mapping of element metadata objects to interface types.
Public method GetInterfaceTypeByName Returns the type that matches the given interface name.
Public method GetParentElementClasses(Type) Gets direct composed or hierarchical parent element metadata objects for a specified interface type.
Public method GetParentElementClasses(ModelElementClass) Gets direct composed or hierarchical parents for a given element metadata object.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method HasComposingParent
Public method HasHierarchicalParent
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetupIdentifierCreation
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member MaxPossibleIdentifierParts Represents the maximum possible number of identifier parts that can be in a model identifier.

Top

Remarks

One of the important initialization steps of a DatabaseSchemaProvider (DSP) is the population of a ModelSchema object. The concrete implementation of the RegisterStoreTypes(ModelSchema) is passed a ModelSchema instance, which the implementation must then use to register elements, properties, relationships, and annotations that describe the model.

Once a ModelSchema object is created, the instance is reused for the life of the DSP instance in order to instantiate DSP-derived (and therefore ModelStore-derived) objects.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Data.Schema.SchemaModel Namespace

DatabaseSchemaProvider

ModelStore

RegisterStoreTypes(ModelSchema)