NDepend.API Documentation
GetRulesInProjectFileAndInRuleFiles Method
NDepend.Project Namespace > ExtensionMethodsProject Class : GetRulesInProjectFileAndInRuleFiles Method
The NDepend project.
Try get rules and queries declared in the project file and in rule files referenced by the project.
Syntax
[Extension()]
public static IController GetRulesInProjectFileAndInRuleFiles( 
   IProject project
)

Parameters

project
The NDepend project.

Return Value

A controller object that can be used to read and update the hierarchy of rules and queries.
Remarks
If some rules cannot be loaded, like rule in a rule file for example, a NDepend.CodeQuery.IGroup object will be present with a NDepend.CodeQuery.IGroup.Name that will contains Failed to load rule file: RuleFileName. To get more information you can call the method TryLoadRuleFile(IProject,IRuleFileRef,IGroup,String) and read the out parameter failureReason.
Requirements

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

See Also

Reference

ExtensionMethodsProject Class
ExtensionMethodsProject Members