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

Parameters

debt
The estimated debt to fix all issues on codeElement
codeElement
The code element on which we infer the rating from the debt
Remarks
Better rating means the rating just better than the actual one.
If code element actual rating is DebtRating.D, better rating is DebtRating.C.
If code element actual rating is DebtRating.B, better rating is DebtRating.A.
If code element actual rating is DebtRating.A, this method returns Debt.Debt.Zero.
If ToDebtRatio returns null for codeElement, this method 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

IDebtFormatter Interface
IDebtFormatter Members