NDepend.API Documentation
SuppressMessageScope Enumeration
NDepend.Issue Namespace : SuppressMessageScope Enumeration
Scope on which a ISuppressMessage object is applied.
Syntax
[Flags()]
public enum SuppressMessageScope : System.Enum 
Members
MemberDescription
EventScope Event doesn't have corresponding standard scope string but is part of the scope Member.
FieldScope Field, use the string "Field" in the SuppressMessageAttribute.Scope.
MemberScope Member, use the string "member" in the SuppressMessageAttribute.Scope.
MethodScope Method, use the string "method" in the SuppressMessageAttribute.Scope.
ModuleScope Module (which means assembly wide), use the string "module" in the SuppressMessageAttribute.Scope.
NamespaceScope Namespace, use the string "namespace" in the SuppressMessageAttribute.Scope.
PropertyScope Property doesn't have corresponding standard scope string but is part of the scope Member.
ThisOnlyScope this-only means that corresponding issues are suppressed only for the ISuppressMessage.CodeElement, and not for any of its child code element.
TypeScope 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).
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         NDepend.Issue.SuppressMessageScope

Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

NDepend.Issue Namespace