DiagnosticSuppressor Class

Definition

The base type for diagnostic suppressors that can programmatically suppress analyzer and/or compiler non-error diagnostics.

C#
public abstract class DiagnosticSuppressor : Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer
Inheritance
DiagnosticSuppressor

Constructors

Properties

SupportedDiagnostics
SupportedSuppressions

Returns a set of descriptors for the suppressions that this suppressor is capable of producing.

Methods

Equals(Object) (Inherited from DiagnosticAnalyzer)
GetHashCode() (Inherited from DiagnosticAnalyzer)
Initialize(AnalysisContext)
ReportSuppressions(SuppressionAnalysisContext)

Suppress analyzer and/or compiler non-error diagnostics reported for the compilation. This may be a subset of the full set of reported diagnostics, as an optimization for supporting incremental and partial analysis scenarios. A diagnostic is considered suppressible by a DiagnosticSuppressor if all of the following conditions are met: 1. Diagnostic is not already suppressed in source via pragma/suppress message attribute. 2. Diagnostic's DefaultSeverity is not Error. 3. Diagnostic is not tagged with NotConfigurable custom tag.

ToString() (Inherited from DiagnosticAnalyzer)

Applies to

Tuote Versiot
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0