TrackingPropertyDescriptor 类

为模型元素的跟踪属性提供其他运行时类型信息。

继承层次结构

System.Object
  System.ComponentModel.MemberDescriptor
    System.ComponentModel.PropertyDescriptor
      Microsoft.VisualStudio.Modeling.Design.ElementPropertyDescriptor
        Microsoft.VisualStudio.Modeling.Design.TrackingPropertyDescriptor
          Microsoft.VisualStudio.Modeling.DslDefinition.Design.DslDefinitionModelElementTrackingPropertyDescriptor

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

语法

声明
Public Class TrackingPropertyDescriptor _
    Inherits ElementPropertyDescriptor
public class TrackingPropertyDescriptor : ElementPropertyDescriptor

TrackingPropertyDescriptor 类型公开以下成员。

构造函数

  名称 说明
公共方法 TrackingPropertyDescriptor(ModelElement, DomainPropertyInfo, DomainPropertyInfo, array<Attribute[]) 初始化 TrackingPropertyDescriptor 类的新实例。
公共方法 TrackingPropertyDescriptor(ElementTypeDescriptor, ModelElement, DomainPropertyInfo, DomainPropertyInfo, array<Attribute[]) 使用指定的默认值提供方初始化 TrackingPropertyDescriptor 类的新实例。

页首

属性

  名称 说明
受保护的属性 AttributeArray 获取或设置特性数组。 (继承自 MemberDescriptor。)
公共属性 Attributes 获取该成员的特性集合。 (继承自 MemberDescriptor。)
公共属性 Category 获取类别,在其中将域属性分组(当显示在 PropertyGrid 控件中的属性设置为“已分类”模式时)。 (继承自 ElementPropertyDescriptor。)
公共属性 ComponentType 获取该属性绑定到的模型元素的类型。 (继承自 ElementPropertyDescriptor。)
公共属性 Converter 获取所述属性的转换器。 (继承自 ElementPropertyDescriptor。)
公共属性 Description 获取描述的属性的说明,如 DescriptionResourceAttribute 中所指定的。 (继承自 ElementPropertyDescriptor。)
公共属性 DesignTimeOnly 获取是否只能在设计时设置该成员,如 DesignOnlyAttribute 中所指定的。 (继承自 MemberDescriptor。)
公共属性 DisplayName 获取描述的属性的显示名称,如 DisplayNameResourceAttribute 中所指定的。 (继承自 ElementPropertyDescriptor。)
公共属性 DomainPropertyInfo 获取用于生成该属性描述符的属性信息对象。 (继承自 ElementPropertyDescriptor。)
公共属性 IsBrowsable 获取一个指示该成员是否可浏览的值,如 BrowsableAttribute 中所指定的。 (继承自 MemberDescriptor。)
公共属性 IsInstanceBased 测试 PropertyDescriptor 是否基于实例或静态类型。 (继承自 ElementPropertyDescriptor。)
公共属性 IsLocalizable 获取指示是否应该本地化该属性的值,如 LocalizableAttribute 中所指定的值。 (继承自 PropertyDescriptor。)
公共属性 IsReadOnly 获取一个值,该值指示描述的属性是否为只读的。 (继承自 ElementPropertyDescriptor。)
公共属性 ModelElement 获取用于生成该属性描述符的模型元素。 (继承自 ElementPropertyDescriptor。)
公共属性 Name 获取此成员的名称。 (继承自 MemberDescriptor。)
受保护的属性 NameHashCode 获取此成员名称的哈希代码,如 GetHashCode 中所指定的。 (继承自 MemberDescriptor。)
公共属性 PropertyType 获取该介绍的属性的属性类型。 (继承自 ElementPropertyDescriptor。)
公共属性 SerializationVisibility 获取指示是否应该序列化该属性的值,如 DesignerSerializationVisibilityAttribute 中所指定的值。 (继承自 PropertyDescriptor。)
公共属性 SupportsChangeEvents 获取一个值,该值指示此属性的值更改通知是否源自属性说明符的外部。 (继承自 PropertyDescriptor。)

页首

方法

  名称 说明
公共方法 AddValueChanged (继承自 ElementPropertyDescriptor。)
公共方法 CanResetValue 指示域属性的值是否可以重置。 (重写 ElementPropertyDescriptor.CanResetValue(Object)。)
受保护的方法 CreateAttributeCollection 使用传递到构造函数的特性数组创建特性的集合。 (继承自 MemberDescriptor。)
受保护的方法 CreateInstance 创建指定类型的实例。 (继承自 PropertyDescriptor。)
公共方法 Equals 将此对象与另一个对象进行比较,看看它们是否相等。 (继承自 PropertyDescriptor。)
受保护的方法 FillAttributes PropertyDescriptor 的特性添加到父类中的指定特性列表中。 (继承自 PropertyDescriptor。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetChildProperties() 返回默认的 PropertyDescriptorCollection。 (继承自 PropertyDescriptor。)
公共方法 GetChildProperties(array<Attribute[]) 通过将指定的特性数组用作筛选器,返回 PropertyDescriptorCollection。 (继承自 PropertyDescriptor。)
公共方法 GetChildProperties(Object) 返回给定对象的 PropertyDescriptorCollection。 (继承自 PropertyDescriptor。)
公共方法 GetChildProperties(Object, array<Attribute[]) 通过将指定的特性数组用作筛选器,返回给定对象的 PropertyDescriptorCollection。 (继承自 PropertyDescriptor。)
公共方法 GetEditor 返回描述的属性的值编辑器。 (继承自 ElementPropertyDescriptor。)
公共方法 GetHashCode 返回该对象的哈希代码。 (继承自 PropertyDescriptor。)
受保护的方法 GetInvocationTarget 此方法返回应在成员调用期间使用的对象。 (继承自 PropertyDescriptor。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 GetTypeFromName 返回使用其名称的类型。 (继承自 PropertyDescriptor。)
公共方法 GetValue 获取域属性的值。 (继承自 ElementPropertyDescriptor。)
受保护的方法 GetValueChangedHandler 检索特定组件的 ValueChanged 事件处理程序的当前集合。 (继承自 PropertyDescriptor。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 OnValueChanged 引发已实现的 ValueChanged 事件。 (继承自 PropertyDescriptor。)
公共方法 RemoveValueChanged (继承自 ElementPropertyDescriptor。)
公共方法 ResetValue 重置跟踪属性的值。 (重写 ElementPropertyDescriptor.ResetValue(Object)。)
公共方法 SetValue 设置域属性的值。 (继承自 ElementPropertyDescriptor。)
公共方法 ShouldSerializeValue 指示是否应序列化跟踪属性。 (重写 ElementPropertyDescriptor.ShouldSerializeValue(Object)。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

备注

此类用于跟踪属性提供自定义特性信息。

域特定语言工具 (DSL 工具) 使用该类型表示的域类属性,直到用户更新值,概括另一个域。属性计算 此类型控件跟踪属性如何按域模型的属性网格处理对于修改描述的属性提供事务。

跟踪属性具有两个状态:跟踪和更新该用户。 此状态。第二,布尔属性,表示指定,当跟踪属性说明符时创建。 默认,布尔属性值应当为 true,则对应状态跟踪。

此说明符控制 重置 命令是否在属性网格的快捷菜单启用属性,并更新关联布尔属性的值,当跟踪属性重置时。

对调用者的说明

若要添加用于跟踪属性 DSL 到定义,请实现以下功能:

  • 自定义属性值更改所有跟踪属性的处理程序。

  • 返回所有跟踪属性的跟踪属性说明符的自定义类型说明符。

  • 所有跟踪属性,其计算值,在这种情况下会在关联布尔属性是 true。

您还必须确保每值跟踪属性正确设置,就存储构造,例如在 DSL 模型创建和加载时。

线程安全

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

请参阅

参考

Microsoft.VisualStudio.Modeling.Design 命名空间

其他资源

Defining Domain Properties