ModelStore Class

Implements physical storage for a schema model instance.

Inheritance Hierarchy

System.Object
  Microsoft.Data.Schema.SchemaModel.ModelStore
    Microsoft.Data.Schema.SchemaModel.DataSchemaModel

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

Syntax

'Declaration
<SerializableAttribute> _
Public MustInherit Class ModelStore _
    Implements IModelAnnotationHolder, IDisposable, ISerializable
[SerializableAttribute]
public abstract class ModelStore : IModelAnnotationHolder, 
    IDisposable, ISerializable
[SerializableAttribute]
public ref class ModelStore abstract : IModelAnnotationHolder, 
    IDisposable, ISerializable
[<AbstractClass>]
[<SerializableAttribute>]
type ModelStore =  
    class
        interface IModelAnnotationHolder
        interface IDisposable
        interface ISerializable
    end
public abstract class ModelStore implements IModelAnnotationHolder, IDisposable, ISerializable

The ModelStore type exposes the following members.

Constructors

  Name Description
Protected method ModelStore(SerializationInfo, StreamingContext)
Protected method ModelStore(ModelCollation, ModelSchema, String)

Top

Properties

  Name Description
Public propertyStatic member BuiltInPropertyTypes
Public property Collation
Public property Comparer Gets the collation comparer object.
Public property IsDisposing
Public property IsOptimizedForInsert
Public property IsOptimizedForQuery
Public property Schema
Public property WriteCount Returns the value of the current write count.

Top

Methods

  Name Description
Public method AddAnnotation Adds an annotation to the model.
Public methodStatic member Attach
Protected method CleanupExternalProperty When implemented in a derived class, releases resources that are used by an external property when the element is deleted.
Public method CreateAnnotation(Type)
Public method CreateAnnotation(ModelAnnotationClass) Creates an annotation by using the given annotation metadata.
Public method CreateAnnotation<TAnnotation>()
Public method CreateElement(Type)
Public method CreateElement(ModelElementClass) Creates an element by using the given element metadata object.
Public method CreateElement<TElement>()
Public method CreateElementHandle
Protected method CreateExternalElement(Type) Creates an external element.
Protected method CreateExternalElement(ModelElementClass) Creates an external element by using the provided element metadata object.
Protected method CreateExternalElement<TElement>() Creates an external element of the specified type.
Protected method CreateExternalNamedElement(Type, ModelIdentifier) Creates a named external element by using the provided type and identifier.
Protected method CreateExternalNamedElement(ModelElementClass, ModelIdentifier) Creates a named external element by using the provided element metadata object and identifier.
Protected method CreateExternalNamedElement<TElement>(ModelIdentifier) Creates a named external element of the specified type by using the provided element metadata object and identifier.
Public method CreateIdentifier(ICollection<String>) Creates a unique model identifier by using the provided collection of part names.
Public method CreateIdentifier(array<String[]) Creates a unique model identifier by using the provided array of part names.
Public method CreateIdentifier(Boolean, ICollection<String>) Creates a unique model identifier by using the provided collection of name parts.
Public method CreateIdentifier(Boolean, array<String[]) Creates a unique model identifier by using the provided case-sensitive indication and array of part names.
Public method CreateIdentifier(IList<String>, ICollection<String>) Creates a unique model identifier by using the provided list of external part names, indication of case sensitivity, and collection of part names.
Public method CreateIdentifier(IList<String>, Boolean, ICollection<String>) Creates a unique model identifier by using the provided list of external parts, indication of case sensitivity, and collection of part names.
Public method CreateIdentifier(IList<String>, Boolean, array<String[]) Creates a unique model identifier by using the provided list of external part names, indication of case sensitivity, and array of part names.
Public method CreateIdentifierHandle Creates a handle for the provided identifier.
Public method CreateNamedAnnotation(Type, ModelIdentifier) Creates a named ModelAnnotation object by using the provided model identifier.
Public method CreateNamedAnnotation(ModelAnnotationClass, ModelIdentifier) Creates a named ModelAnnotation object by using the provided annotation metadata object and identifier.
Public method CreateNamedAnnotation<TAnnotation>(ModelIdentifier) Creates a named ModelAnnotation object by using the provided model identifier.
Public method CreateNamedElement(Type, ModelIdentifier)
Public method CreateNamedElement(ModelElementClass, ModelIdentifier)
Public method CreateNamedElement<TElement>(ModelIdentifier)
Public method DecodeIdentifier(String) Returns an identifier that corresponds to the decoded value of the provided string.
Public methodStatic member DecodeIdentifier(String, List<String>%, List<String>%) Returns an identifier that corresponds to the decoded value of the provided string.
Protected method DeserializeExternalProperty Returns the value of an external property by using the provided XML reader and property metadata object.
Public methodStatic member Detach
Public method Dispose() Disposes the model.
Protected method Dispose(Boolean) Disposes the model.
Public methodStatic member EncodeIdentifier Returns a string representation of the identifier that is encoded with appropriate quotation and separator characters to demarcate its parts.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize (Overrides Object.Finalize().)
Protected method FixupAfterDeserialization
Public method FreeElementHandle Frees the provided element handle.
Public method FreeIdentifierHandle Frees the provided element handle.
Public method GetAllAnnotations() Returns a list of all annotations.
Public method GetAllAnnotations(Type)
Public method GetAllAnnotations(ModelIdentifier) Returns a list of all annotations that are named with the provided identifier.
Public method GetAllAnnotations(ModelIdentifier, Type)
Public method GetAllAnnotations<TType>() Returns a list of the annotations on the model that implements the given type.
Public method GetAllAnnotations<TType>(ModelIdentifier) Returns all annotations that implement the given type.
Public method GetAnnotations() Returns all the annotations on the model.
Public method GetAnnotations(Type) Returns a list of the annotations on the model that implements the given type.
Public method GetAnnotations(ModelIdentifier) Returns a list of the annotations on the model that matches the given identifiers.
Public method GetAnnotations(ModelIdentifier, Type) Returns all annotations that have the given identifier name, and that implement the given type.
Public method GetAnnotations<TType>()
Public method GetAnnotations<TType>(ModelIdentifier) Returns all elements.
Public method GetElementHandleTarget Returns a model element that is identified by the provided handle.
Public method GetElements(ModelElementResolutionStatus) Returns a list of the elements in the store that has the given resolution status.
Public method GetElements(ModelElementValidationStatus) Returns a list of the elements in the store that has the given validation status.
Public method GetElements(Type, ModelElementQueryFilter)
Public method GetElements(ModelElementClass, ModelElementQueryFilter) Returns elements that share the given metadata object as selected by the given filter.
Public method GetElements(ModelElementResolutionStatus, Int32) Returns a list of the elements that aredetermined by the count that has the given resolution status.
Public method GetElements(ModelElementValidationStatus, Int32) Returns a list of the elements that are determined by the count that has the given validation status.
Public method GetElements(ModelIdentifier, ModelElementClass, ModelElementQueryFilter)
Public method GetElements(ModelIdentifier, ModelIdentifierGroup, ModelElementQueryFilter)
Public method GetElements(ModelIdentifier, Type, ModelElementQueryFilter)
Public method GetElements<TElement>(ModelElementQueryFilter)
Public method GetElements<TElement>(ModelIdentifier, ModelElementQueryFilter)
Public method GetElementsCount(ModelElementResolutionStatus) Returns the number of elements in the store that match the given status.
Public method GetElementsCount(ModelElementValidationStatus) Returns the number of elements in the store that match the given status.
Public method GetElementsFrom(String, ModelElementClass, ModelElementQueryFilter)
Public method GetElementsFrom(String, Type, ModelElementQueryFilter)
Public method GetElementsFrom<TElement>(String, ModelElementQueryFilter)
Protected method GetExternalProperty<TProperty>
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetIdentifier(ICollection<String>)
Public method GetIdentifier(array<String[]) Gets the identifier from the model by scope ID and a string.
Public method GetIdentifier(IList<String>, ICollection<String>)
Public method GetIdentifierHandleTarget
Public method GetObjectData
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodStatic member IsBuiltInPropertyType
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnModelElementChanged
Public method OptimizeForInitialPopulation
Public method OptimizeForQuery
Public method RemoveAnnotation Removes an annotation from the model.
Protected method SerializeExternalProperty
Protected method SetExternalProperty<TProperty>
Public method TestWriteCount Tests the write count with the given value.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method UpdateSourceNamePrefixes
Protected method ValidateWriteAccess

Top

Events

  Name Description
Public event ModelChanged
Public event ModelOptimizationChanged

Top

Remarks

The physical store–related constructs for a model are in this class. ModelStore has minimal services and no direct affinity for modeling databases. Instead, ModelStore is a basic modeling API that implements Elements, Annotations and Relationships, and Properties.

DataSchemaModel is an abstract base class that inherits ModelStore and represents a database-specific model API, which includes access to services for model building from Script Document Object Model (DOM), and vice versa. Database platform-specific model implementations, such as Sql90SchemaModel, are derived from DataSchemaModel.

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

DataSchemaModel

Sql90SchemaModel

Other Resources

Extending the Database Features of Visual Studio