Suppression.Create(SuppressionDescriptor, Diagnostic) 方法

定义

创建对给定SuppressionDescriptor项的Diagnostic抑制。

public static Microsoft.CodeAnalysis.Diagnostics.Suppression Create (Microsoft.CodeAnalysis.SuppressionDescriptor descriptor, Microsoft.CodeAnalysis.Diagnostic suppressedDiagnostic);
static member Create : Microsoft.CodeAnalysis.SuppressionDescriptor * Microsoft.CodeAnalysis.Diagnostic -> Microsoft.CodeAnalysis.Diagnostics.Suppression
Public Shared Function Create (descriptor As SuppressionDescriptor, suppressedDiagnostic As Diagnostic) As Suppression

参数

descriptor
SuppressionDescriptor

抑制的描述符,该描述符必须用于SupportedSuppressionsDiagnosticSuppressor创建此抑制。

suppressedDiagnostic
Diagnostic

Diagnostic 要禁止,必须从 ReportedDiagnostics 该抑制上下文中创建此抑制。

返回

适用于