SuppressionDescriptor 构造函数

定义

重载

SuppressionDescriptor(String, String, LocalizableString)

创建一个 SuppressionDescriptor,它提供有关编程抑制的 Diagnostic可本地化理由。

SuppressionDescriptor(String, String, String)

创建一个 SuppressionDescriptor,它提供编程抑制 Diagnostic的理由。 注意:对于可 justification本地化,请使用构造函数重载 SuppressionDescriptor(String, String, LocalizableString)

SuppressionDescriptor(String, String, LocalizableString)

Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs

创建一个 SuppressionDescriptor,它提供有关编程抑制的 Diagnostic可本地化理由。

public SuppressionDescriptor (string id, string suppressedDiagnosticId, Microsoft.CodeAnalysis.LocalizableString justification);
new Microsoft.CodeAnalysis.SuppressionDescriptor : string * string * Microsoft.CodeAnalysis.LocalizableString -> Microsoft.CodeAnalysis.SuppressionDescriptor
Public Sub New (id As String, suppressedDiagnosticId As String, justification As LocalizableString)

参数

id
String

抑制的唯一标识符。 例如,抑制 ID“SP1001”。

suppressedDiagnosticId
String

已抑制诊断的标识符,即 Id。例如,编译器警告 ID“CS0649”。

justification
LocalizableString

抑制的理由。 例如:“在标记为 YYY 属性的字段上取消 CS0649,因为它们是隐式分配的。

适用于

SuppressionDescriptor(String, String, String)

Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs
Source:
SuppressionDescriptor.cs

创建一个 SuppressionDescriptor,它提供编程抑制 Diagnostic的理由。 注意:对于可 justification本地化,请使用构造函数重载 SuppressionDescriptor(String, String, LocalizableString)

public SuppressionDescriptor (string id, string suppressedDiagnosticId, string justification);
new Microsoft.CodeAnalysis.SuppressionDescriptor : string * string * string -> Microsoft.CodeAnalysis.SuppressionDescriptor
Public Sub New (id As String, suppressedDiagnosticId As String, justification As String)

参数

id
String

抑制的唯一标识符。 例如,抑制 ID“SP1001”。

suppressedDiagnosticId
String

已抑制诊断的标识符,即 Id。例如,编译器警告 ID“CS0649”。

justification
String

抑制的理由。 例如:“在标记为 YYY 属性的字段上取消 CS0649,因为它们是隐式分配的。

适用于