NDepend.API Documentation
ToDebtRating Method
NDepend.TechnicalDebt Namespace > IDebtFormatter Interface : ToDebtRating Method
The estimated debt to fix all issues on codeElement
The code element on which we infer the rating from the debt
Estimate the debt rating of codeElement in the range DebtRating.A (very good) to DebtRating.E (very bad).
Syntax

Parameters

debt
The estimated debt to fix all issues on codeElement
codeElement
The code element on which we infer the rating from the debt

Return Value

The debt rating in the range DebtRating.A (very good) to DebtRating.E (very bad) or null if the method NDepend.CodeModel.ExtensionMethodsHelpers.GetNbLinesOfCode_GuaranteedIfPDBFound returns null for codeElement.
Remarks
The debt rating is estimated by the value of the Technical Debt Ratio for codeElement obtained from ToDebtRatio, and from the various rating thresholds defined in this this.DebtSettings object.
If ToDebtRatio returns null for codeElement, this method returns null as well.
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