ModelElement Class

Provides a base class for schema model elements that are supported by a specific database schema provider.

Inheritance Hierarchy

System.Object
  Microsoft.Data.Schema.SchemaModel.ModelElement
    Microsoft.Data.Schema.SchemaModel.DataSchemaModel.ScriptSourcedModelElement

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

Syntax

'Declaration
Public MustInherit Class ModelElement _
    Implements IModelElement, IModelPropertyContainer, IModelEntity, IModelAnnotationHolder
public abstract class ModelElement : IModelElement, 
    IModelPropertyContainer, IModelEntity, IModelAnnotationHolder
public ref class ModelElement abstract : IModelElement, 
    IModelPropertyContainer, IModelEntity, IModelAnnotationHolder
[<AbstractClass>]
type ModelElement =  
    class
        interface IModelElement
        interface IModelPropertyContainer
        interface IModelEntity
        interface IModelAnnotationHolder
    end
public abstract class ModelElement implements IModelElement, IModelPropertyContainer, IModelEntity, IModelAnnotationHolder

The ModelElement type exposes the following members.

Constructors

  Name Description
Protected method ModelElement Initializes a new instance of the ModelElement class.

Top

Properties

  Name Description
Public property ElementClass Gets the ElementClass metadata for the element.
Public property Model Gets the ModelStore for the element.
Public property Name Gets the identifier for the element.
Public property ResolutionStatus Gets the current resolution status.
Public property SourceCodePositions
Public property ValidationStatus Gets a value that indicates the validation status of the current element.

Top

Methods

  Name Description
Public method AddAnnotation Adds the provided IModelAnnotation object to the element.
Public method Delete Deletes the current element from the schema model.
Public method Equals Determines whether a provided object is equal to the current element. (Overrides Object.Equals(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 GetAnnotations() Gets a list of annotations that have been added to this element.
Public method GetAnnotations(Type) Gets a list of annotations of the specified type that have been added to this element.
Public method GetAnnotations(ModelIdentifier) Gets a list of annotations that have been added to the specified element, which is a child element of the current element.
Public method GetAnnotations(ModelIdentifier, Type) Gets a list of annotations of the specified type that have been added to the specified element that is a child of the current element.
Public method GetAnnotations<TType>() Gets a list of annotations of the provided type that are attached to the current element.
Public method GetAnnotations<TType>(ModelIdentifier) Gets a list of annotations that are attached to the specified element and whose type matches the provided Type.
Public method GetComposingChildren Returns a list of child-composing elements.
Public method GetHashCode Serves as a hash function for a particular type. (Overrides Object.GetHashCode().)
Public method GetHierarchicalChildren Gets a list of the child hierarchical child elements.
Public method GetMultiRelationship<TFrom, TTo>
Public method GetOwnerInfo Returns information about the owner of the current element.
Public method GetProperty<TProperty>
Public method GetReferencedDanglingRelationshipEntries
Public method GetReferencedElements
Public method GetReferencedRelationshipEntries
Public method GetReferencingElements
Public method GetReferencingRelationshipEntries
Public method GetRelationship(ModelRelationshipClass)
Public method GetRelationship<TFrom, TTo>(ModelRelationshipClass)
Public method GetRelationships Returns a list of relationships that are registered in the element.
Public method GetReverseMultiRelationship<TFrom, TTo>
Public method GetReverseSingleRelationship<TFrom, TTo>
Public method GetSingleRelationship<TFrom, TTo>
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsDeleted Returns a value that indicates whether the current element has been deleted.
Public method IsExternal Returns a value that indicates whether the current element has been loaded from a source outside the current schema.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodStatic member RegisterElementClass<TElement>
Protected methodStatic member RegisterExternalPropertyClass<TProperty>
Protected methodStatic member RegisterPropertyClass<TProperty>
Protected methodStatic member RegisterRelationshipClass<TReferencedInterface>(ModelElementClass, String, ModelRelationshipType, ModelRelationshipCardinalityStyle, Boolean)
Protected methodStatic member RegisterRelationshipClass<TReferencedInterface>(ModelElementClass, String, ModelRelationshipType, ModelRelationshipCardinalityStyle, Boolean, Boolean)
Protected methodStatic member RegisterReverseRelationshipClass<TReferencedInterface>
Public method RemoveAnnotation Removes the specified annotation from the element.
Public method SetProperty<TProperty>
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

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

SqlModelElement