ElementTypeDescriptor 类

ModelElement 对象提供其他运行时类型信息。

继承层次结构

System.Object
  System.ComponentModel.CustomTypeDescriptor
    Microsoft.VisualStudio.Modeling.Design.ElementTypeDescriptor
      Microsoft.VisualStudio.Modeling.Diagrams.PresentationElementTypeDescriptor
      Microsoft.VisualStudio.Modeling.DslDefinition.ConnectorHasDecoratorsTypeDescriptor
      Microsoft.VisualStudio.Modeling.DslDefinition.Design.DslDefinitionModelElementTypeDescriptor
      Microsoft.VisualStudio.Modeling.DslDefinition.ExplorerBehaviorTypeDescriptor
      Microsoft.VisualStudio.Modeling.DslDefinition.ShapeHasDecoratorsTypeDescriptor
      Microsoft.VisualStudio.Modeling.DslDefinition.XmlSerializationBehaviorTypeDescriptor

命名空间:  Microsoft.VisualStudio.Modeling.Design
程序集:  Microsoft.VisualStudio.Modeling.Sdk.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)

语法

声明
Public Class ElementTypeDescriptor _
    Inherits CustomTypeDescriptor
public class ElementTypeDescriptor : CustomTypeDescriptor

ElementTypeDescriptor 类型公开以下成员。

构造函数

  名称 说明
受保护的方法 ElementTypeDescriptor(Type) 表示要使用的 MEL 类型的创建包装类的 ctor。
受保护的方法 ElementTypeDescriptor(ModelElement) 初始化 ElementTypeDescriptor 类的新实例。
受保护的方法 ElementTypeDescriptor(ICustomTypeDescriptor, ModelElement) 使用父级自定义类型说明符初始化 ElementTypeDescriptor 类的新实例。
受保护的方法 ElementTypeDescriptor(ICustomTypeDescriptor, Type) 表示要使用的 MEL 类型的创建包装类的 ctor。

页首

属性

  名称 说明
受保护的属性 ComponentType 获取 Type of the model element that this class is representing. 类代表的模型元素。
公共属性 ModelElement 获得该类当前表示的模型元素。
受保护的属性 Store

页首

方法

  名称 说明
受保护的方法 CollectionRolePropertiesBrowsable 对于此模型元素参与的所有关系,返回是否基于角色的 Collection 属性的任何 PropertyDescriptor 是可以浏览的。
受保护的方法 CreateCollectionPropertyDescriptor
受保护的方法 CreatePropertyDescriptor 创建模型元素属性的描述符。
受保护的方法 CreateRolePlayerPropertyDescriptor 创建模型元素角色属性的描述符。
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetAttributes 返回此类型说明符表示的类型的自定义特性集合。 (继承自 CustomTypeDescriptor。)
受保护的方法 GetCategory 返回域属性类别的本地化字符串。
公共方法 GetClassName 返回此类型说明符表示的类的名称。 (重写 CustomTypeDescriptor.GetClassName()。)
公共方法 GetComponentName 获取此种类表示的模块元素的名称。 (重写 CustomTypeDescriptor.GetComponentName()。)
公共方法 GetConverter 返回此类型说明符表示的类型的类型转换器。 (继承自 CustomTypeDescriptor。)
公共方法 GetDefaultEvent 返回此类型说明符表示的对象的默认事件的事件说明符。 (继承自 CustomTypeDescriptor。)
公共方法 GetDefaultProperty 返回此类型说明符表示的对象的默认属性的属性描述符。 (继承自 CustomTypeDescriptor。)
受保护的方法 GetDescription 返回域属性说明的本地化字符串。
受保护的方法 GetDisplayProperties(ModelElement, PropertyDescriptor%) 返回所有模型元素属性的属性描述符集合。
受保护的方法 GetDisplayProperties(ModelElement, Store, PropertyDescriptor%) 返回与每个域属性相应的属性说明符列表
受保护的方法 GetDomainClassInfo 返回要描述的元素类型的域类信息。
受保护的方法 GetDomainPropertyAttributes 返回应用于描述的属性的自定义特性的数组。
公共方法 GetEditor 返回要与此类型说明符表示的类关联的指定类型的编辑器。 (继承自 CustomTypeDescriptor。)
公共方法 GetEvents() 返回此类型说明符所表示对象的事件说明符的集合。 (继承自 CustomTypeDescriptor。)
公共方法 GetEvents(array<Attribute[]) 返回此类型说明符所表示的对象的已筛选事件说明符集合。 (继承自 CustomTypeDescriptor。)
受保护的方法 GetExtensionProperties 返回任何扩展元素的属性描述符
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetProperties() 返回包含所有描述类型属性的域属性描述符集合。 (重写 CustomTypeDescriptor.GetProperties()。)
公共方法 GetProperties(array<Attribute[]) 返回包含所有描述类型属性的域属性描述符集合,该集合由指定的属性筛选。 (重写 CustomTypeDescriptor.GetProperties(array<Attribute[])。)
受保护的方法 GetPropertyDescriptorDisplayName 返回域属性显示名称的本地化字符串。
公共方法 GetPropertyOwner 返回包含指定的属性描述符所描述的属性的对象。 (继承自 CustomTypeDescriptor。)
受保护的方法 GetRolePlayerPropertyAttributes 返回应用于描述角色属性的自定义特性的数组。
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 IncludeCollectionRoleProperties 对于此模型元素参与的所有关系,返回是否为基于角色的 Collection 属性提供 PropertyDescriptor。
受保护的方法 IncludeEmbeddingRelationshipProperties 对于指定的模型元素,返回值指示是否添加任何不许复制的嵌入式关系下的目标元素属性。
受保护的方法 IncludeOppositeRolePlayerProperties 对于指定的模型元素,返回值指示是否为“0到1”和“1到0”的关系添加角色属性。
受保护的方法 IsPropertyDescriptorReadOnly 返回一个值,该值指示所描述的属性是否为只读。
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 ShouldCreateCollectionPropertyDescriptor 对于角色扮演者涉及的关系和实例,返回是否为集合创建属性描述符。
受保护的方法 ShouldCreatePropertyDescriptor 返回指示说明符是否应能创建为指定域属性的值。
受保护的方法 ShouldCreateRolePlayerPropertyDescriptor 返回指示说明符是否能创建为指定的角色属性的值。
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

备注

此类提供对模型元素动态的自定义类型信息。

域特定语言工具 (DSL 工具) 使用该类型表示在域模型中的模型元素。 此类型控件元素如何按域模型的属性网格处理并提供了方法。中描述的元素。

若要创建自定义元素类型描述符,从该类继承并重写一个或多个成员。

备注

如果域 DSL 定义为类指定字段类型描述符,则定义的生成代码包含一将类型描述符,从 ElementTypeDescriptor派生,具体而言该域类。有关详细信息,请参阅显示相关元素的属性 - 重定向

线程安全

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

请参阅

参考

Microsoft.VisualStudio.Modeling.Design 命名空间

ElementTypeDescriptionProvider

TypeDescriptionProviderAttribute