Method Suppress
Suppress(SuppressionDefinition)
Suppresses a diagnostic from the default declaration of the current ScopedDiagnosticSink.
Declaration
public void Suppress(SuppressionDefinition suppression)
Parameters
Type | Name | Description |
---|---|---|
SuppressionDefinition | suppression |
Suppress(SuppressionDefinition, IDeclaration)
Suppresses a diagnostic by specifying the declaration in which the suppression must be effective.
Declaration
public 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. |