Table of Contents

Interface IProjectRuleFiles

Namespace
NDepend.Project
Assembly
NDepend.API.dll

Represents the list of rule files referenced by this project.

public interface IProjectRuleFiles
Extension Methods

Property (1)

RuleFilesRef

Gets all rule files referenced by this project.

IReadOnlyList<IRuleFileRef> RuleFilesRef { get; }

Property Value

IReadOnlyList<IRuleFileRef>

Methods (4)

TryAdd(IFilePath, bool)

Add a rule file referenced by this project.

bool TryAdd(IFilePath filePath, bool active)

Parameters

filePath IFilePath

The rule file path.

active bool

The rule file active status.

Returns

bool

false if there is already a rule file referenced by this project, with IRuleFileRef.Path equals to filePath else the rule file gets added and the method returns true.

Remarks

If this method adds a rule file, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.RuleFilesRef_Paths activated.

TryChangeRuleFileRefActivation(IFilePath, bool)

Change the activation of a rule file referenced by this project.

bool TryChangeRuleFileRefActivation(IFilePath filePath, bool active)

Parameters

filePath IFilePath

The rule file path.

active bool

The new rule file active status.

Returns

bool

false if there is no rule file with IRuleFileRef.Path equals to filePath.

Remarks

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

TryChangeRuleFileRefPath(IFilePath, IFilePath)

Change the path of a rule file referenced by this project.

bool TryChangeRuleFileRefPath(IFilePath filePathOld, IFilePath filePathNew)

Parameters

filePathOld IFilePath

The old path of the rule file to override.

filePathNew IFilePath

The new path of the rule file.

Returns

bool

false if there is no rule file with IRuleFileRef.Path equals to filePathOld.

Remarks

If there is a rule file with IRuleFileRef.Path equals to filePathOld, its path gets overridden by the value filePathNew. If this method modifies the path of a rule file, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.RuleFilesRef_Paths activated.

TryRemove(IFilePath)

Remove a rule file referenced by this project.

bool TryRemove(IFilePath filePath)

Parameters

filePath IFilePath

The rule file path.

Returns

bool

false if there is no rule file with IRuleFileRef.Path equals to filePath, else returns true.

Remarks

If this method removes a rule file, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.RuleFilesRef_Paths activated.

See Also