Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Diagnostics / Scoped­Diagnostic­Sink

Class ScopedDiagnosticSink

Encapsulates an IDiagnosticSink and the default target of diagnostics, suppressions, and code fixes.

Inheritance
ScopedDiagnosticSink
Implements
IDiagnosticSink
Namespace: Metalama.Framework.Diagnostics
Assembly: Metalama.Framework.dll
Syntax
public sealed class ScopedDiagnosticSink : ValueType, IDiagnosticSink

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.

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.

Suggest(CodeFix)

Suggest a code fix without reporting a diagnostic.

Suggest(CodeFix, IDiagnosticLocation)

Suggest a code fix without reporting a diagnostic.

Suppress(SuppressionDefinition)

Suppresses a diagnostic from the default declaration of the current ScopedDiagnosticSink.

Suppress(SuppressionDefinition, IDeclaration)

Suppresses a diagnostic by specifying the declaration in which the suppression must be effective.

See Also