NDepend.API Documentation
CodeRuleAttribute Constructor
NDepend.Attributes Namespace > CodeRuleAttribute Class : CodeRuleAttribute Constructor
The string that contains the CQLinq or CQL code rule or query.
Initializes a new instance of the CodeRuleAttribute class, from the specified codeRuleString.
Syntax
public CodeRuleAttribute( 
   string codeRuleString
)

Parameters

codeRuleString
The string that contains the CQLinq or CQL code rule or query.
Remarks
When declaring a code rule in source file, you can use one of the tags $FullName$ or $Name$ to paste in the rule string the NDepend.CodeModel.ICodeElement.Name of the code element tagged or the NDepend.CodeModel.ICodeElement.FullName of the member (type/method/field) tagged.
Requirements

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

See Also

Reference

CodeRuleAttribute Class
CodeRuleAttribute Members