MetalamaAPI documentationAspect APIMetalama.​Framework.​DiagnosticsScoped­Diagnostic­Sink
Open sandboxFocus

ScopedDiagnosticSink Class

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

Inheritance
System.Object
ScopedDiagnosticSink
Namespace: Metalama.Framework.Diagnostics
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed class ScopedDiagnosticSink : ValueType

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