mscorlib 2.0.0.0 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=true, Inherited=false) System.Diagnostics.Conditional("CODE_ANALYSIS")

This attribute can be applied to any application element. For a complete list of the violations that can be suppressed, see Code Analysis for Managed Code Warnings.

The is applied to this class, specifying the preprocessing symbol "CODE_ANALYSIS" as the conditional symbol that determines whether the attribute call is included or omitted. If the symbol is defined, the attribute call is included; otherwise, the call is omitted.

When you right-click a Code Analysis warning in the Visual Studio Error List and then click Suppress Message(s), a SuppressMessage attribute is added either in your code or to the project's global suppressions file. For more information about the SuppressMessage attribute and its use in Visual Studio, see In Source Suppression Overview.

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

- Constructor
  2.0.0.0
  4.0.0.0

  The parameter value is specific to the analysis tool and categorizes the rule identified by the parameter. The two parameters concatenated together form a unique identifier for the rule.

  The preprocessor symbol "CODE_ANALYSIS" must be defined for this attribute to be effective. The absence of the preprocessor symbol results in the attribute not being applied.

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

  The category for the attribute.
  The identifier of the analysis tool rule the attribute applies to.
- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The property describes the tool or tool analysis category for which a message suppression attribute applies.

  Gets the category identifying the classification of the attribute.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  Concatenated together, the and properties form a unique check identifier.

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

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added. To be added.

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

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The property is an optional argument that specifies additional exclusion where the literal metadata target is not sufficiently precise. For example, the cannot be applied within a method, and it may be desirable to suppress a violation against a statement in the method that will give a rule violation, but not against all statements in the method.

  Gets or sets an optional argument expanding on exclusion criteria.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The property is an optional argument that specifies the metadata scope for which the attribute is relevant. Possible values for managed metadata include "member", "resource", "module", "type", "method", or "namespace".

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

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The property is an optional argument identifying the analysis target of the attribute. An example value is "System.IO.Stream.ctor():System.Void". Because it is fully qualified, it can be long, particularly for targets such as parameters. The analysis tool user interface should be capable of automatically formatting the parameter.

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