ModelElement 类

为特定数据库架构提供程序支持的架构模型元素提供基类。

继承层次结构

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

命名空间:  Microsoft.Data.Schema.SchemaModel
程序集:  Microsoft.Data.Schema(在 Microsoft.Data.Schema.dll 中)

语法

声明
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

ModelElement 类型公开以下成员。

构造函数

  名称 说明
受保护的方法 ModelElement 初始化 ModelElement 类的新实例。

页首

属性

  名称 说明
公共属性 ElementClass 获取元素的 ElementClass 元数据。
公共属性 Model 获取元素的 ModelStore
公共属性 Name 获取元素的标识符。
公共属性 ResolutionStatus 获取当前解析状态。
公共属性 SourceCodePositions
公共属性 ValidationStatus 获取一个值,该值指示当前元素的验证状态。

页首

方法

  名称 说明
公共方法 AddAnnotation 将所提供的 IModelAnnotation 对象添加到元素。
公共方法 Delete 从架构模型中删除当前元素。
公共方法 Equals 确定所提供的对象是否等于当前元素。 (重写 Object.Equals(Object)。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetAnnotations() 获取已添加到此元素的批注的列表。
公共方法 GetAnnotations(Type) 获取已添加到此元素的指定类型批注的列表。
公共方法 GetAnnotations(ModelIdentifier) 获取已添加到指定元素(当前元素的子元素)的批注的列表。
公共方法 GetAnnotations(ModelIdentifier, Type) 获取一个列表,其中包含已添加到当前元素指定子元素中的指定类型的批注。
公共方法 GetAnnotations<TType>() 获取附加到当前元素的所提供类型的批注的列表。
公共方法 GetAnnotations<TType>(ModelIdentifier) 获取附加到指定元素且其类型与所提供的 Type 匹配的批注的列表。
公共方法 GetComposingChildren 返回构成子元素的列表。
公共方法 GetHashCode 用作特定类型的哈希函数。 (重写 Object.GetHashCode()。)
公共方法 GetHierarchicalChildren 获取层次结构子元素的列表。
公共方法 GetMultiRelationship<TFrom, TTo>
公共方法 GetOwnerInfo 返回有关当前元素的所有者的信息。
公共方法 GetProperty<TProperty>
公共方法 GetReferencedDanglingRelationshipEntries
公共方法 GetReferencedElements
公共方法 GetReferencedRelationshipEntries
公共方法 GetReferencingElements
公共方法 GetReferencingRelationshipEntries
公共方法 GetRelationship(ModelRelationshipClass)
公共方法 GetRelationship<TFrom, TTo>(ModelRelationshipClass)
公共方法 GetRelationships 返回元素中已注册关系的列表。
公共方法 GetReverseMultiRelationship<TFrom, TTo>
公共方法 GetReverseSingleRelationship<TFrom, TTo>
公共方法 GetSingleRelationship<TFrom, TTo>
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IsDeleted 返回一个值,该值指示是否已删除当前元素。
公共方法 IsExternal 返回一个值,该值指示是否从当前架构之外的源加载的当前元素。
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法静态成员 RegisterElementClass<TElement>
受保护的方法静态成员 RegisterExternalPropertyClass<TProperty>
受保护的方法静态成员 RegisterPropertyClass<TProperty>
受保护的方法静态成员 RegisterRelationshipClass<TReferencedInterface>(ModelElementClass, String, ModelRelationshipType, ModelRelationshipCardinalityStyle, Boolean)
受保护的方法静态成员 RegisterRelationshipClass<TReferencedInterface>(ModelElementClass, String, ModelRelationshipType, ModelRelationshipCardinalityStyle, Boolean, Boolean)
受保护的方法静态成员 RegisterReverseRelationshipClass<TReferencedInterface>
公共方法 RemoveAnnotation 从元素中移除指定的批注。
公共方法 SetProperty<TProperty>
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.Data.Schema.SchemaModel 命名空间

SqlModelElement