Table of Contents

Enum SuppressMessageScope

Namespace
NDepend.Issue
Assembly
NDepend.API.dll

Scope on which a ISuppressMessage object is applied.

[Flags]
public enum SuppressMessageScope : ushort
Extension Methods

Fields (9)

Event = 64

Scope Event doesn't have corresponding standard scope string but is part of the scope Member.

Field = 16

Scope Field, use the string "Field" in the SuppressMessageAttribute.Scope.

Member = Method | Field | Property | Event

Scope Member, use the string "member" in the SuppressMessageAttribute.Scope.

Member means methods and fields.

Method = 8

Scope Method, use the string "method" in the SuppressMessageAttribute.Scope.

Module = 1

Scope Module (which means assembly wide), use the string "module" in the SuppressMessageAttribute.Scope.

Namespace = 2

Scope Namespace, use the string "namespace" in the SuppressMessageAttribute.Scope.

Property = 32

Scope Property doesn't have corresponding standard scope string but is part of the scope Member.

ThisOnly = 0

Scope this-only means that corresponding issues are suppressed only for the ISuppressMessage.CodeElement, and not for any of its child code element.

Type = 4

Scope Type, use the string "type" in the SuppressMessageAttribute.Scope.

Remarks

Scope can be use to ignore issues of a rule on all methods and fields defined in a type or in a namespace.
Several scopes can be provided in the SuppressMessageAttribute.Scope, separated with a space like "assembly namespace type".
Notice the special Scope value "deep" that means this code element and all its child code element.
For an assembly, Scope value "deep" means Module | Namespace | Type | Method | Field.
For a namespace, Scope value "deep" means Namespace | Type | Method | Field.
For a type, Scope value "deep" means Type | Method | Field.
For a method, Scope value "deep" means Method only (no child code elements for a method).
For a field, Scope value "deep" means Field only (no child code elements for a field).