DescriptionResourceAttribute 類別
表示屬性的屬性描述,當該屬性顯示在PropertyGrid控制項中時。
繼承階層架構
System.Object
System.Attribute
System.ComponentModel.DescriptionAttribute
Microsoft.VisualStudio.Modeling.Design.DescriptionResourceAttribute
命名空間: Microsoft.VisualStudio.Modeling.Design
組件: Microsoft.VisualStudio.Modeling.Sdk.12.0 (在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)
語法
'宣告
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple := False)> _
Public NotInheritable Class DescriptionResourceAttribute _
Inherits DescriptionAttribute
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public sealed class DescriptionResourceAttribute : DescriptionAttribute
DescriptionResourceAttribute 類型會公開下列成員。
建構函式
名稱 | 描述 | |
---|---|---|
DescriptionResourceAttribute(String, Type) | 使用指定的描述索引鍵和型別,初始化 DescriptionResourceAttribute 類別的新執行個體。 | |
DescriptionResourceAttribute(String, Type, String) | 使用指定的描述索引鍵、型別和資源名稱,初始化 DescriptionResourceAttribute 類別的新執行個體。 |
回頁首
屬性
名稱 | 描述 | |
---|---|---|
Description | 取得描述,當地語系化為目前的文化特性。 (覆寫 DescriptionAttribute.Description。) | |
DescriptionKey | 取得在指定的資源中的描述資源項目的索引鍵。 | |
ResourceName | 取得資源的根名稱。 | |
Type | 取得型別,其識別內含資源的組件。 | |
TypeId | 在衍生類別中實作時,取得這個 Attribute 的唯一識別項。 (繼承自 Attribute)。 |
回頁首
方法
名稱 | 描述 | |
---|---|---|
Equals | 傳回值,表示指定的物件值是否等於目前的 DescriptionAttribute。 (繼承自 DescriptionAttribute)。 | |
GetHashCode | 傳回這個執行個體的雜湊碼。 (繼承自 DescriptionAttribute)。 | |
GetType | 取得目前執行個體的 Type。 (繼承自 Object)。 | |
IsDefaultAttribute | 傳回數值,表示此項目是否為預設的 DescriptionAttribute 執行個體。 (繼承自 DescriptionAttribute)。 | |
Match | 在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。 (繼承自 Attribute)。 | |
ToString | 傳回表示目前物件的字串。 (繼承自 Object)。 |
回頁首
明確介面實作
名稱 | 描述 | |
---|---|---|
_Attribute.GetIDsOfNames | 將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。 (繼承自 Attribute)。 | |
_Attribute.GetTypeInfo | 擷取物件的型別資訊,可以用來取得介面的型別資訊。 (繼承自 Attribute)。 | |
_Attribute.GetTypeInfoCount | 擷取物件提供的型別資訊介面數目 (0 或 1)。 (繼承自 Attribute)。 | |
_Attribute.Invoke | 提供物件所公開的屬性和方法的存取權。 (繼承自 Attribute)。 |
回頁首
備註
這個類別的 Description 屬性取得已當地語系化為目前的文化特性的描述字串資源。 如果當地語系化字串是 null,則 Description 屬性會傳回 DescriptionKey 屬性的值。
當您設計 Domain-Specific Language (DSL) 時,產生的程式碼會將這個屬性對應於在 DSL 定義中的網域屬性的個別屬性。
執行緒安全
這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員是安全執行緒。