Open sandboxFocus

Interface IScopedDiagnosticSink

A diagnostic sink with a default scope that simplifies reporting diagnostics and suppressions.

Namespace: Metalama.Framework.Diagnostics
Assembly: Metalama.Framework.dll
Syntax
public interface IScopedDiagnosticSink
Remarks

This interface provides a simplified API for reporting diagnostics and suppressions by maintaining a default target location and declaration. This eliminates the need to specify the location or scope with each call, unlike IDiagnosticSink which requires explicit locations and scopes.

Instances of ScopedDiagnosticSink are typically accessed through Diagnostics in aspect code.

Properties

Name Description
Sink

Gets the underlying diagnostic sink.

Source

Gets the source reporting diagnostics or suppressions.

Methods

Name Description
Report(IDiagnostic)

Reports a diagnostic to the default location of this scoped sink.

Suppress(ISuppression)

Suppresses a diagnostic within the default declaration scope of this scoped sink.

Extension Methods

See Also