共用方式為


Suppression.Create(SuppressionDescriptor, Diagnostic) Method

Definition

Creates a suppression of a Diagnostic with the given SuppressionDescriptor.

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

Parameters

descriptor
SuppressionDescriptor

Descriptor for the suppression, which must be from SupportedSuppressions for the DiagnosticSuppressor creating this suppression.

suppressedDiagnostic
Diagnostic

Diagnostic to be suppressed, which must be from ReportedDiagnostics for the suppression context in which this suppression is being created.

Returns

Applies to