共用方式為


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 的淺層複本 (Shallow Copy)。 (繼承自 Object)。
受保護的方法 OnValueChanged 引發您實作的 ValueChanged 事件。 (繼承自 PropertyDescriptor)。
公用方法 RemoveValueChanged (繼承自 ElementPropertyDescriptor)。
公用方法 ResetValue 重設追蹤屬性的值。 (覆寫 ElementPropertyDescriptor.ResetValue(Object)。)
公用方法 SetValue 設定網域屬性的值。 (繼承自 ElementPropertyDescriptor)。
公用方法 ShouldSerializeValue 指出是否應該序列化追蹤屬性的值。 (覆寫 ElementPropertyDescriptor.ShouldSerializeValue(Object)。)
公用方法 ToString 傳回表示目前物件的字串。 (繼承自 Object)。

回頁首

備註

這個類別提供追蹤屬性提供動態自訂屬性資訊。

Domain-Specific Language Tools (DSL 工具) 使用這個型別描述項所表示之網域類別的屬性,,直到使用者更新它,以其他網域屬性的值來計算。 型別控制追蹤屬性如何處理在網域模型的屬性方格中處理及修改所描述的屬性提供交易。

追蹤屬性有兩種狀態:追蹤和更新使用者。 這個狀態是由第二個, Boolean 屬性表示,指定,當追蹤屬性描述項建立時。 根據預設,布林值屬性的值必須是 true,對應於追蹤狀態。

這個描述元控制 [重設] 命令是否可在屬性方格中的捷徑功能表會針對中的屬性,並更新關聯的布林值屬性的值時,會在追蹤屬性重設時。

呼叫者注意事項

若要加入追蹤屬性到 DSL 定義,請實作下列功能:

  • 自訂屬性值已變更每個追蹤屬性的處理常式。

  • 傳回每個追蹤屬性的追蹤屬性描述元的自訂型別描述元。

  • 每一個追蹤屬性,在此情況下其值計算時,關聯的布林值屬性為 true。

您也必須確定每個追蹤屬性的值已正確設定,在存放區中建構,例如 DSL 模型的建立和載入時。

執行緒安全

這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員是安全執行緒。

請參閱

參考

Microsoft.VisualStudio.Modeling.Design 命名空間

其他資源

Defining Domain Properties