Encapsulates an IDiagnosticSink and the default target of diagnostics, suppressions, and code fixes.
Namespace: Metalama.Framework.Validation
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public readonly struct ReferenceValidationDiagnosticSink
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. |
Suggest(CodeFix) | Suggest a code fix without reporting a diagnostic. |
Suggest(CodeFix, IDiagnosticLocation) | Suggest a code fix without reporting a diagnostic. |
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. |