共用方式為


RolePlayerPropertyDescriptor 類別

提供角色屬性的其他執行階段型別資訊。

繼承階層架構

System.Object
  System.ComponentModel.MemberDescriptor
    System.ComponentModel.PropertyDescriptor
      Microsoft.VisualStudio.Modeling.Design.RolePlayerPropertyDescriptor

命名空間:  Microsoft.VisualStudio.Modeling.Design
組件:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)

語法

'宣告
<HostProtectionAttribute(SecurityAction.LinkDemand, SharedState := True)> _
Public Class RolePlayerPropertyDescriptor _
    Inherits PropertyDescriptor
[HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true)]
public class RolePlayerPropertyDescriptor : PropertyDescriptor

RolePlayerPropertyDescriptor 類型會公開下列成員。

建構函式

  名稱 描述
公用方法 RolePlayerPropertyDescriptor(ModelElement, DomainRoleInfo, array<Attribute[]) 初始化 RolePlayerPropertyDescriptor 類別的新執行個體。
公用方法 RolePlayerPropertyDescriptor(Store, DomainRoleInfo, array<Attribute[]) 建構函式

回頁首

屬性

  名稱 描述
公用屬性 AllowNull 取得或設定值,指出 null 是否為所述角色屬性的有效值。
受保護的屬性 AttributeArray 取得或設定屬性的陣列。 (繼承自 MemberDescriptor)。
公用屬性 Attributes 取得這個成員的屬性集合。 (繼承自 MemberDescriptor)。
公用屬性 Category 取得成員所屬的分類名稱,如 CategoryAttribute 中所指定的。 (繼承自 MemberDescriptor)。
公用屬性 ComponentType 取得這個屬性所繫結網域項目的型別。 (覆寫 PropertyDescriptor.ComponentType。)
公用屬性 Converter 取得所描述屬性的轉換器。 (覆寫 PropertyDescriptor.Converter。)
公用屬性 Description 取得成員的描述,如 DescriptionAttribute 中所指定的。 (繼承自 MemberDescriptor)。
公用屬性 DesignTimeOnly 取得值,表示這個成員是否只在設計階段設定,如 DesignOnlyAttribute 中所指定的。 (繼承自 MemberDescriptor)。
公用屬性 DisplayName 取得描述之角色屬性的顯示名稱。 (覆寫 MemberDescriptor.DisplayName。)
公用屬性 DomainRoleInfo 取得連結中模型項目的角色的中繼資料。
公用屬性 ElementList 已過時。取得所描述之角色屬性的有效值集合。
公用屬性 IsBrowsable 取得值,表示成員是否可瀏覽,如 BrowsableAttribute 中指定的。 (繼承自 MemberDescriptor)。
公用屬性 IsInstanceBased 測試 PropertyDescriptor 是以執行個體或靜態型別為基礎。
公用屬性 IsLocalizable 取得值,表示這個屬性是否應該當地語系化,如 LocalizableAttribute 中指定的。 (繼承自 PropertyDescriptor)。
公用屬性 IsReadOnly 取得值,指出描述的角色屬性是否為唯讀。 (覆寫 PropertyDescriptor.IsReadOnly。)
公用屬性 Name 取得成員的名稱。 (繼承自 MemberDescriptor)。
受保護的屬性 NameHashCode 取得成員名稱的雜湊程式碼,如 GetHashCode 中所指定的。 (繼承自 MemberDescriptor)。
公用屬性 PropertyType 取得屬性的型別。 (覆寫 PropertyDescriptor.PropertyType。)
公用屬性 RelationshipInfo 取得模型項目在其中是角色扮演者的連結的中繼資料。
公用屬性 RolePlayerMenuCommands 取得 RolePlayerMenuCommand 物件的集合,這些物件表示在使用者選取特定的項目時用來指定角色扮演者執行個體的回呼命令。
公用屬性 SerializationVisibility 取得值,表示這個屬性是否應該序列化,如 DesignerSerializationVisibilityAttribute 中指定的。 (繼承自 PropertyDescriptor)。
公用屬性 SupportsChangeEvents 取得值,表示這個屬性的數值變更告知是否可能來自屬性描述項之外。 (繼承自 PropertyDescriptor)。

回頁首

方法

  名稱 描述
公用方法 AddValueChanged 處理事件接聽程式的加入 (覆寫 PropertyDescriptor.AddValueChanged(Object, EventHandler)。)
受保護的方法 BuildElementList(Object) 取得指定之元件的這個屬性值的有效角色扮演者清單。
受保護的方法 BuildElementList(Object, Boolean) 為指定之元件的這個屬性值建立有效角色扮演者的清單。
公用方法 CanResetValue 表示是否可重設網域屬性的值。 (覆寫 PropertyDescriptor.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)。
受保護的方法 GetDescribedElement 傳回此 RolePlayerPropertyDescriptor 代表角色屬性的 ModelElement (即裝載項目)。請注意,這不一定是關聯性的來源。
公用方法 GetEditor 取得指定型別的編輯器。 (繼承自 PropertyDescriptor)。
公用方法 GetHashCode 傳回這個物件的雜湊程式碼。 (繼承自 PropertyDescriptor)。
受保護的方法 GetInvocationTarget 這個方法會傳回應該在成員的引動過程使用的物件。 (繼承自 PropertyDescriptor)。
受保護的方法 GetSetFieldString 傳回設定值異動之名稱的當地語系化字串。
公用方法 GetStore 傳回這個描述元操作的存放區
公用方法 GetType 取得目前執行個體的 Type。 (繼承自 Object)。
受保護的方法 GetTypeFromName 使用其名稱以傳回型別。 (繼承自 PropertyDescriptor)。
公用方法 GetValue 取得網域角色屬性的值。 (覆寫 PropertyDescriptor.GetValue(Object)。)
受保護的方法 GetValueChangedHandler 對特定元件擷取目前的 ValueChanged 事件處理常式集 (繼承自 PropertyDescriptor)。
受保護的方法 MemberwiseClone 建立目前 Object 的淺層複本 (Shallow Copy)。 (繼承自 Object)。
受保護的方法 OnValueChanged 引發您實作的 ValueChanged 事件。 (繼承自 PropertyDescriptor)。
公用方法 RemoveValueChanged 處理事件接聽程式的移除 (覆寫 PropertyDescriptor.RemoveValueChanged(Object, EventHandler)。)
公用方法 ResetValue 重設角色屬性的值。 (覆寫 PropertyDescriptor.ResetValue(Object)。)
公用方法 SetValue 設定網域角色屬性的值。 (覆寫 PropertyDescriptor.SetValue(Object, Object)。)
公用方法 ShouldSerializeValue 指出是否應該序列化角色屬性的值。 (覆寫 PropertyDescriptor.ShouldSerializeValue(Object)。)
公用方法 ToString 傳回表示目前物件的字串。 (繼承自 Object)。

回頁首

備註

這個類別提供角色動態自訂屬性資訊屬性。

模型項目的 ElementTypeDescriptor 可能會傳回的屬性描述元集合該模型項目屬性的。 這個集合可以包含屬性描述項確定這個項目在其中是角色扮演者的連結。 這些屬性描述元是這個類別的執行個體。 如需詳細資訊,請參閱 Defining Domain RelationshipsElementTypeDescriptor 方法的下列分類: CreateRolePlayerPropertyDescriptorGetDisplayPropertiesShouldCreateRolePlayerPropertyDescriptor

若要建立自訂的角色屬性描述項,請從這個類別繼承並覆寫一或多個成員。

注意事項注意事項

套用至這個類型或成員的 HostProtectionAttribute 屬性 (Attribute) 具有下列 Resources 屬性 (Property) 值:SharedStateHostProtectionAttribute 不會影響桌面應用程式 (這些應用程式的啟動方式一般都是按兩下圖示、輸入命令或在瀏覽器輸入 URL)。如需詳細資訊,請參閱 HostProtectionAttribute 類別或 SQL Server 程式設計和主機保護屬性

執行緒安全

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

請參閱

參考

Microsoft.VisualStudio.Modeling.Design 命名空間

ElementTypeDescriptor

其他資源

Defining Domain Relationships