UnconditionalSuppressMessageAttribute 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
隱藏對特定規則違規的報告,並允許多重隱藏一個單一程式碼成品。
public ref class UnconditionalSuppressMessageAttribute sealed : Attribute
C#
[System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)]
public sealed class UnconditionalSuppressMessageAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)>]
type UnconditionalSuppressMessageAttribute = class
inherit Attribute
Public NotInheritable Class UnconditionalSuppressMessageAttribute
Inherits Attribute
- 繼承
- 屬性
UnconditionalSuppressMessageAttribute 與不同 SuppressMessageAttribute ,因為它沒有 ConditionalAttribute。 它一律會保留在編譯的元件中。 如需詳細資訊,請參閱 修剪警告 簡介和 AOT 警告簡介。
Unconditional |
初始化 UnconditionalSuppressMessageAttribute 類別的新執行個體,指定工具的分類和分析規則的識別項。 |
Category |
取得分類,識別屬性的分類。 |
Check |
取得要隱藏的分析工具規則識別項。 |
Justification |
取得或設定隱藏程式碼分析訊息的對齊。 |
Message |
取得或設定在排除準則上展開的選擇性引數。 |
Scope |
取得或設定與屬性相關的程式碼範圍。 |
Target |
取得或設定完整路徑,其表示屬性的目標。 |
Type |
在衍生類別中實作時,取得這個 Attribute 的唯一識別碼。 (繼承來源 Attribute) |
Equals(Object) |
傳回值,這個值指出此執行個體是否與指定的物件相等。 (繼承來源 Attribute) |
Get |
傳回這個執行個體的雜湊碼。 (繼承來源 Attribute) |
Get |
取得目前執行個體的 Type。 (繼承來源 Object) |
Is |
在衍生類別中覆寫時,表示這個執行個體的值是衍生類別的預設值。 (繼承來源 Attribute) |
Match(Object) |
在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。 (繼承來源 Attribute) |
Memberwise |
建立目前 Object 的淺層複製。 (繼承來源 Object) |
To |
傳回代表目前物件的字串。 (繼承來源 Object) |
產品 | 版本 |
---|---|
.NET | 5, 6, 7, 8, 9 |