LocalizedDescriptionAttribute 類別
這個 API 支援 .NET Framework 基礎結構,但您不可以直接在程式碼中使用它。
表示可當地語系化屬性 (Property) 描述的屬性 (Attribute)。此類別無法被繼承。
繼承階層架構
System.Object
System.Attribute
System.ComponentModel.DescriptionAttribute
Microsoft.VisualStudio.TestTools.Common.LocalizedDescriptionAttribute
命名空間: Microsoft.VisualStudio.TestTools.Common
組件: Microsoft.VisualStudio.QualityTools.Common (在 Microsoft.VisualStudio.QualityTools.Common.dll 中)
語法
'宣告
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple := False)> _
<HostProtectionAttribute(SecurityAction.LinkDemand, SharedState := True)> _
Public NotInheritable Class LocalizedDescriptionAttribute _
Inherits DescriptionAttribute
[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)]
[HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true)]
public sealed class LocalizedDescriptionAttribute : DescriptionAttribute
[AttributeUsageAttribute(AttributeTargets::Property, AllowMultiple = false)]
[HostProtectionAttribute(SecurityAction::LinkDemand, SharedState = true)]
public ref class LocalizedDescriptionAttribute sealed : public DescriptionAttribute
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)>]
[<HostProtectionAttribute(SecurityAction.LinkDemand, SharedState = true)>]
type LocalizedDescriptionAttribute =
class
inherit DescriptionAttribute
end
public final class LocalizedDescriptionAttribute extends DescriptionAttribute
LocalizedDescriptionAttribute 型別會公開下列成員。
建構函式
名稱 | 說明 | |
---|---|---|
![]() |
LocalizedDescriptionAttribute | 使用提供的型別和 ID,初始化 LocalizedDescriptionAttribute 類別的新執行個體。 |
回頁首
屬性
名稱 | 說明 | |
---|---|---|
![]() |
Description | 取得屬性的當地語系化描述。 (覆寫 DescriptionAttribute.Description。) |
![]() |
ResourceId | 取得包含描述之資源的識別碼。 |
![]() |
ResourceType | 取得資源檔案的 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)。 |
回頁首
備註
如需如何使用屬性的詳細資訊,請參閱使用屬性擴充中繼資料。
![]() |
---|
套用至這個型別或成員的 HostProtectionAttribute 屬性 (Attribute) 具有下列 Resources 屬性 (Property) 值:SharedState。HostProtectionAttribute 不會影響桌面應用程式 (這些應用的啟動方式一般都是按兩下圖示、輸入命令或在瀏覽器輸入 URL)。如需詳細資訊,請參閱 HostProtectionAttribute 類別或 SQL Server 程式設計和主機保護屬性。 |
執行緒安全
這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。不保證任何執行個體成員是安全執行緒。
請參閱
參考
Microsoft.VisualStudio.TestTools.Common 命名空間