NDepend.API Documentation
TryChangeRuleFileRefActivation Method
NDepend.Project Namespace > IProjectRuleFiles Interface : TryChangeRuleFileRefActivation Method
The rule file path.
The new rule file active status.
Change the activation of a rule file referenced by this project.
Syntax
bool TryChangeRuleFileRefActivation( 
   IFilePath filePath,
   bool active
)

Parameters

filePath
The rule file path.
active
The new rule file active status.

Return Value

false if there is no rule file with IRuleFileRef.IRuleFileRef.Path equals to filePath.
Remarks
If there is a rule file with IRuleFileRef.IRuleFileRef.Path equals to filePath, its value IRuleFileRef.IRuleFileRef.IsActive gets overridden by the value active. If this method modifies the IRuleFileRef.IRuleFileRef.IsActive status of a rule file, the event IProject.IProject.SettingsChanged is triggered with the flag ProjectSettings.ProjectSettings.RuleFilesRef_Activation activated.
Requirements

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

See Also

Reference

IProjectRuleFiles Interface
IProjectRuleFiles Members