Open sandboxFocus

Class SuppressionDefinition

Defines the suppression of a kind of diagnostics. Suppression definitions must be static fields or properties of an aspect classes. Suppressions are instantiated with Suppress(ISuppression, IDeclaration, IDiagnosticSource).

Inheritance
SuppressionDefinition
Implements
Namespace: Metalama.Framework.Diagnostics
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public sealed class SuppressionDefinition : ISuppression

Constructors

Name Description
SuppressionDefinition(string, string?)

Initializes a new instance of the SuppressionDefinition class.

Properties

Name Description
Justification
SuppressedDiagnosticId

Gets the ID of the diagnostic to be suppressed (e.g. CS0169).

Methods

Name Description
ToString()
WithFilter(Func<ISuppressibleDiagnostic, bool>)

Returns a new instance of the current suppression with a filter that will be applied to the diagnostics.

Extension Methods

See Also