Encapsulates an IDiagnosticSink and the default target of diagnostics, suppressions, and code fixes.
Implements
Namespace: Metalama.Framework.Diagnostics
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public readonly struct ScopedDiagnosticSink : IScopedDiagnosticSinkConstructors
| Name | Description |
|---|---|
| ScopedDiagnosticSink(IDiagnosticSink, IDiagnosticSource, IDiagnosticLocation?, IDeclaration?) |
Properties
| Name | Description |
|---|---|
| DefaultTargetDeclaration | Gets the declaration on which diagnostics or code fixes will be reported or suppressed. |
| DefaultTargetLocation | Gets the location on which diagnostics or code fixes will be reported or suppressed. |
| Sink | |
| Source |
Methods
| Name | Description |
|---|---|
| Report(IDiagnostic) | Reports a diagnostic to the default location of the current ScopedDiagnosticSink.. |
| Report(IDiagnostic, IDiagnosticLocation?) | Reports a parametric diagnostic by specifying its location. |
| Suppress(ISuppression) | Suppresses a diagnostic from the default declaration of the current ScopedDiagnosticSink. |
| Suppress(ISuppression, IDeclaration) | Suppresses a diagnostic by specifying the declaration in which the suppression must be effective. |