Encapsulates an IDiagnosticSink and the default target of diagnostics, suppressions, and code fixes.
Implements
Namespace: Metalama.Extensions.Validation
Assembly: Metalama.Extensions.Validation.dll
Syntax
[CompileTime]
public readonly struct ReferenceValidationDiagnosticSink : IScopedDiagnosticSinkProperties
| Name | Description |
|---|---|
| Sink | Gets the underlying diagnostic sink. |
| Source | Gets the source reporting diagnostics or suppressions. |
Methods
| Name | Description |
|---|---|
| Report(IDiagnostic) | Reports the same diagnostic to the all references in the current context. |
| Report(IDiagnostic, IDiagnosticLocation) | Reports a parametric diagnostic by specifying its location. |
| Report(Func<ReferenceDetail, IDiagnostic?>, Func<ReferenceDetail, IDiagnosticLocation?>?) | Reports a different diagnostic for each reference in the current context. |
| 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. |