Table of Contents

Interface IIssuesSetBuilder

Namespace
NDepend.Issue
Assembly
NDepend.API.dll

An issues-set-builder lets add and remove rules and issues in IssuesSet.

public interface IIssuesSetBuilder
Extension Methods

Remarks

An issues-set can be created through CreateIssuesSet(ICodeBase, IDebtFormatter) or ComputeIssues(IAnalysisResult).

When an IIssuesSet is referenced by an IIssuesSetDiff object, the IIssuesSet.Builder must not be used to add an remove rules and issues, the IIssuesSetDiff.Builder object must be used instead.

An issues-set is not thread-safe. It is safe to call IIssuesSet methods concurrently from several threads but it is not safe to call these methods and IIssuesSetBuilder methods concurrently from several threads, this would provoke corrupted state and exceptions.

Property (1)

IssuesSet

The issues-set that is modified by this builder.

IIssuesSet IssuesSet { get; }

Property Value

IIssuesSet

Methods (5)

AddQualityGate(IQualityGate)

Add qualityGate to IssuesSet.

void AddQualityGate(IQualityGate qualityGate)

Parameters

qualityGate IQualityGate

The quality gate to add.

Exceptions

ArgumentException

Thrown if IssuesSet already contains qualityGate.

AddRule(IRuleIssues)

Add a ruleIssues.Rule and its ruleIssues.Issues to IssuesSet.

void AddRule(IRuleIssues ruleIssues)

Parameters

ruleIssues IRuleIssues

The rule and issues to add.

Remarks

A IRuleIssues object can be obtained from GetIssues(IRule, IQueryExecutionSuccessResult).
When a rule is added or removed this.IssuesSet.AllQualityGates are not recomputed. Hence the quality gates that rely on issues or debt might have a dirty state.

Exceptions

ArgumentException

Thrown if IssuesSet already contains the ruleIssues.Rule.
Also thrown if an issue of ruleIssues.Issues have a CodeElement that doesn't belong to IssuesSet.CodeBase.

ImportIssues(IRuleIssues[])

Aggregate imported issues from rulesIssues.

void ImportIssues(IRuleIssues[] rulesIssues)

Parameters

rulesIssues IRuleIssues[]

The imported rules and issues.

RemoveQualityGate(IQualityGate)

Remove qualityGate from IssuesSet.

void RemoveQualityGate(IQualityGate qualityGate)

Parameters

qualityGate IQualityGate

The quality gate to remove.

Exceptions

ArgumentException

Thrown if IssuesSet doesn't contains qualityGate.

RemoveRule(IRule)

Remove the rule and its issues from IssuesSet.

void RemoveRule(IRule rule)

Parameters

rule IRule

The rule to remove.

Remarks

When a rule is added or removed this.IssuesSet.AllQualityGates are not recomputed and those that relies on issues and debt might have a dirty state.

Exceptions

ArgumentException

Thrown if IssuesSet doesn't contain the rule.