ClientPropertyAttribute 類別
可用來將伺服器物件修改產生的用戶端物件的可視性的自訂 Team Foundation 屬性。 屬性名稱也可以藉由覆寫屬性名稱。 產生的欄位名稱將會與第一個字元的屬性名稱轉換為小寫表單,如果前置字元符號為「m_」。 具有私用可視性的屬性根本不會產生屬性。 這個機制可以用來避免產生多餘的屬性。
繼承階層
System.Object
System.Attribute
Microsoft.TeamFoundation.Framework.Server.ClientPropertyAttribute
命名空間: Microsoft.TeamFoundation.Framework.Server
組件: Microsoft.TeamFoundation.Framework.Server (在 Microsoft.TeamFoundation.Framework.Server.dll 中)
語法
'宣告
<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple := False)> _
Public NotInheritable Class ClientPropertyAttribute _
Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public sealed class ClientPropertyAttribute : Attribute
ClientPropertyAttribute 類型會公開下列成員。
建構函式
名稱 | 描述 | |
---|---|---|
ClientPropertyAttribute() | ||
ClientPropertyAttribute(ClientVisibility) | 指定兩個 get/set 可視性為相同值的建構函式。 | |
ClientPropertyAttribute(ClientVisibility, ClientVisibility) | 可讓不同的可視性規格的每個屬性的 get 和 set 方法的建構函式。 |
回頁首
屬性
名稱 | 描述 | |
---|---|---|
Direction | 傳回方向與這個屬性。預設為雙向的。 | |
GetterVisibility | 傳回在屬性指定的用戶端可視性。預設是公用的。 | |
PropertyName | 如果提供了,傳回屬性名稱的人。如果沒有提供之屬性名稱使用屬性或欄位的預設名稱。 | |
SetterVisibility | 傳回在屬性指定的用戶端可視性。預設是公用的。 | |
TypeId | 在衍生類別中實作時,取得這個 Attribute 的唯一識別項。 (繼承自 Attribute)。 | |
UseClientDefinedProperty | 是否在用戶端指定產生欄位和使用它 (預設值),或者參考具名 Property,假設已經存在。這對於衍生型別應手的,當我們希望用戶端繼承不會模擬伺服器繼承時,或者當,我們要插入在產生的程式碼和成員存取之間的程式碼。 |
回頁首
方法
名稱 | 描述 | |
---|---|---|
Equals | 基礎架構。傳回數值,表示這個執行個體是否等於指定的物件。 (繼承自 Attribute)。 | |
GetHashCode | 傳回這個執行個體的雜湊碼。 (繼承自 Attribute)。 | |
GetType | 取得目前執行個體的 Type。 (繼承自 Object)。 | |
IsDefaultAttribute | 在衍生類別中覆寫時,表示這個執行個體的值是否為衍生類別的預設值。 (繼承自 Attribute)。 | |
Match | 在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。 (繼承自 Attribute)。 | |
ToString | 傳回代表目前物件的字串。 (繼承自 Object)。 |
回頁首
明確介面實作
名稱 | 描述 | |
---|---|---|
_Attribute.GetIDsOfNames | 將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。 (繼承自 Attribute)。 | |
_Attribute.GetTypeInfo | 擷取物件的型別資訊,可以用來取得介面的型別資訊。 (繼承自 Attribute)。 | |
_Attribute.GetTypeInfoCount | 擷取物件提供的型別資訊介面數目 (0 或 1)。 (繼承自 Attribute)。 | |
_Attribute.Invoke | 提供物件所公開的屬性和方法的存取權。 (繼承自 Attribute)。 |
回頁首
執行緒安全
這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員是安全執行緒。