UnconditionalSuppressMessageAttribute Class

Definition

Suppresses reporting of a specific rule violation, allowing multiple suppressions on a single code artifact.

public ref class UnconditionalSuppressMessageAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)]
public sealed class UnconditionalSuppressMessageAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)>]
type UnconditionalSuppressMessageAttribute = class
    inherit Attribute
Public NotInheritable Class UnconditionalSuppressMessageAttribute
Inherits Attribute
Inheritance
UnconditionalSuppressMessageAttribute
Attributes

Remarks

UnconditionalSuppressMessageAttribute is different than SuppressMessageAttribute in that it doesn't have a ConditionalAttribute. It's always preserved in the compiled assembly. For more information, see Introduction to trim warnings and Introduction to AOT warnings.

Constructors

UnconditionalSuppressMessageAttribute(String, String)

Initializes a new instance of the UnconditionalSuppressMessageAttribute class, specifying the category of the tool and the identifier for an analysis rule.

Properties

Category

Gets the category identifying the classification of the attribute.

CheckId

Gets the identifier of the analysis tool rule to be suppressed.

Justification

Gets or sets the justification for suppressing the code analysis message.

MessageId

Gets or sets an optional argument expanding on exclusion criteria.

Scope

Gets or sets the scope of the code that is relevant for the attribute.

Target

Gets or sets a fully qualified path that represents the target of the attribute.

TypeId

When implemented in a derived class, gets a unique identifier for this Attribute.

(Inherited from Attribute)

Methods

Equals(Object)

Returns a value that indicates whether this instance is equal to a specified object.

(Inherited from Attribute)
GetHashCode()

Returns the hash code for this instance.

(Inherited from Attribute)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
IsDefaultAttribute()

When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.

(Inherited from Attribute)
Match(Object)

When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(Inherited from Attribute)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also