NDepend.API Documentation
CostToReachBetterRating Method (ExtensionMethodsCQLinqIssuesSet)
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqIssuesSet Class : 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 AllDebt(codeElement).
Syntax
[Extension()]
public static Nullable<Debt> CostToReachBetterRating( 
   ICodeElement codeElement
)

Parameters

codeElement
The code element on which we infer the cost to reach a better rating.
Exceptions
ExceptionDescription
This extension method cannot be called from a program consuming NDepend.API. In such context, the method NDepend.Issue.IIssuesSet.CostToReachBetterRating must be called instead.
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 NDepend.TechnicalDebt.IDebtFormatter.NDepend.TechnicalDebt.IDebtFormatter.CostToReachBetterRating.
This method returns null if NDepend.TechnicalDebt.IDebtFormatter.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

ExtensionMethodsCQLinqIssuesSet Class
ExtensionMethodsCQLinqIssuesSet Members