Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Diagnostics / IDiagnostic­Sink / Suppress

Method Suppress

Suppress(SuppressionDefinition, IDeclaration)

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

Declaration
void Suppress(SuppressionDefinition suppression, IDeclaration scope)
Parameters
Type Name Description
SuppressionDefinition suppression

The suppression definition, which must be defined as a static field or property.

IDeclaration scope

The declaration in which the diagnostic must be suppressed.