NDepend.API Documentation
CostToReachRating Method (ExtensionMethodsCQLinqIssuesSet)
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqIssuesSet Class : CostToReachRating Method
The code element on which we infer the cost to reach ratingToReach.
The rating to reach for codeElement
Returns the estimated effort to reach ratingToReach, based on the fact that codeElement has actually a total debt estimated to AllDebt(codeElement).
Syntax
[Extension()]
public static Nullable<Debt> CostToReachRating( 
   ICodeElement codeElement,
   DebtRating ratingToReach
)

Parameters

codeElement
The code element on which we infer the cost to reach ratingToReach.
ratingToReach
The rating to reach for codeElement
Exceptions
ExceptionDescription
This extension method cannot be called from a program consuming NDepend.API. In such context, the method NDepend.Issue.IIssuesSet.CostToReachRating must be called instead.
Remarks
If the actual rating of DebtRating(codeElement) is equals or better than ratingToReach, this method returns a zero duration NDepend.TechnicalDebt.Debt value.
This method implementation calls NDepend.TechnicalDebt.IDebtFormatter.NDepend.TechnicalDebt.IDebtFormatter.CostToReachRating.
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