SuppressionAnalysisContext Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Context for suppressing analyzer and/or compiler non-error diagnostics reported for the compilation.
public struct SuppressionAnalysisContext
public readonly struct SuppressionAnalysisContext
type SuppressionAnalysisContext = struct
Public Structure SuppressionAnalysisContext
- Inheritance
-
SuppressionAnalysisContext
Properties
CancellationToken |
Token to check for requested cancellation of the analysis. |
Compilation |
Compilation for the context. |
Options |
Options specified for the analysis. |
ReportedDiagnostics |
Analyzer and/or compiler non-error diagnostics reported for the compilation. Each DiagnosticSuppressor only receives diagnostics whose IDs were declared suppressible in its SupportedSuppressions. 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. |
Methods
GetSemanticModel(SyntaxTree) |
Gets a SemanticModel for the given SyntaxTree, which is shared across all analyzers. |
ReportSuppression(Suppression) |
Report a Suppression for a reported diagnostic. |