NDepend.API Documentation
CostToReachBetterRating Method (IIssuesSet)
NDepend.Issue Namespace > IIssuesSet Interface : CostToReachBetterRating Method
The code element on which we infer the cost to reach a better rating.
Returns the estimated cost, to reach a better rating, based on the fact that codeElement has actually a total debt estimated to AllDebtIn(ICodeElement)(codeElement).
Syntax
Nullable<Debt> CostToReachBetterRating( 
   ICodeElement codeElement
)

Parameters

codeElement
The code element on which we infer the cost to reach a better rating.
Exceptions
ExceptionDescription
Thrown if the codeElement doesn't belong to CodeBase.
Remarks
Better rating means the rating just better than the actual one.
If code element actual rating is NDepend.TechnicalDebt.DebtRating.D, better rating is NDepend.TechnicalDebt.DebtRating.C.
If code element actual rating is NDepend.TechnicalDebt.DebtRating.B, better rating is NDepend.TechnicalDebt.DebtRating.A.
If code element actual rating is NDepend.TechnicalDebt.DebtRating.A, this method returns NDepend.TechnicalDebt.Debt.NDepend.TechnicalDebt.Debt.Zero.
This method implementation calls this.DebtFormatter.NDepend.TechnicalDebt.IDebtFormatter.CostToReachBetterRating.
This method returns null if this.DebtFormatter.NDepend.TechnicalDebt.IDebtFormatter.ToDebtRatio(codeElement) returns null.
Requirements

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

See Also

Reference

IIssuesSet Interface
IIssuesSet Members