IModelElement 接口

为架构模型中每个元素提供基础。

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

语法

声明
Public Interface IModelElement _
    Inherits IModelPropertyContainer, IModelEntity, IModelAnnotationHolder
public interface IModelElement : IModelPropertyContainer, 
    IModelEntity, IModelAnnotationHolder
public interface class IModelElement : IModelPropertyContainer, 
    IModelEntity, IModelAnnotationHolder
type IModelElement =  
    interface
        interface IModelPropertyContainer
        interface IModelEntity
        interface IModelAnnotationHolder
    end
public interface IModelElement extends IModelPropertyContainer, IModelEntity, IModelAnnotationHolder

IModelElement 类型公开以下成员。

属性

  名称 说明
公共属性 ElementClass 获取元素的元数据类。
公共属性 Model 获取模型引用。 (继承自 IModelEntity。)
公共属性 Name 获取或设置元素的名称。
公共属性 ResolutionStatus 获取或设置模型元素解析状态的值。
公共属性 SourceCodePositions 获取用于定义此元素的源的列表。
公共属性 ValidationStatus 获取或设置模型元素验证状态的值。

页首

方法

  名称 说明
公共方法 AddAnnotation 将给定批注添加到此元素。 (继承自 IModelAnnotationHolder。)
公共方法 Delete 从模型中删除此实例。
公共方法 GetAnnotations() 返回附加到此元素的批注的列表。 (继承自 IModelAnnotationHolder。)
公共方法 GetAnnotations(Type) 返回给定类型的附加批注的列表。 (继承自 IModelAnnotationHolder。)
公共方法 GetAnnotations(ModelIdentifier) 返回具有给定标识符的附加批注的列表。 (继承自 IModelAnnotationHolder。)
公共方法 GetAnnotations(ModelIdentifier, Type) (继承自 IModelAnnotationHolder。)
公共方法 GetAnnotations<TType>() 返回实现给定批注类型且具有指定模型标识符的所有附加模型批注。 (继承自 IModelAnnotationHolder。)
公共方法 GetAnnotations<TType>(ModelIdentifier) (继承自 IModelAnnotationHolder。)
公共方法 GetComposingChildren 返回构成此元素的子级的列表。
公共方法 GetHierarchicalChildren 返回此元素的层次结构子级的列表。
公共方法 GetOwnerInfo 返回有关元素所有者的信息。
公共方法 GetProperty<TProperty> 获取指定属性。 (继承自 IModelPropertyContainer。)
公共方法 GetReferencedDanglingRelationshipEntries 返回关系项的列表,其中此元素位于左侧,而关系的右侧或者没有元素,或者位于右侧的元素在模型中不存在。
公共方法 GetReferencedElements 返回位于具有此元素的关系中元素的列表,其中此元素位于关系的左侧。
公共方法 GetReferencedRelationshipEntries 返回关系项的列表,其中此元素位于左侧。
公共方法 GetReferencingElements 返回位于具有此元素的关系中元素的列表,其中此元素位于右侧。
公共方法 GetReferencingRelationshipEntries 返回关系项的列表,其中此元素位于右侧。
公共方法 GetRelationship(ModelRelationshipClass) 使用提供的元数据返回所请求的关系。
公共方法 GetRelationship<TFrom, TTo>(ModelRelationshipClass) 返回一个关系,其中两个相关元素属于指定类型。
公共方法 GetRelationships 返回此元素中关系的列表。
公共方法 IsDeleted 指定是否删除对象。
公共方法 IsExternal 返回一个值,该值指示对象是否从外部源加载且不是架构模型的一部分。
公共方法 RemoveAnnotation 从此模型元素中移除指定的批注。 (继承自 IModelAnnotationHolder。)
公共方法 SetProperty<TProperty> 设置指定的属性。 (继承自 IModelPropertyContainer。)

页首

请参见

参考

Microsoft.Data.Schema.SchemaModel 命名空间

其他资源

扩展 Visual Studio 的数据库功能