NDepend.API Documentation
DebtRatio Method (ExtensionMethodsCQLinqIssuesSet)
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqIssuesSet Class : DebtRatio Method
The code element on which we infer the percentage of debt.
Estimate the ratio of technical debt, measured through AllDebt(codeElement). This ratio is expressed in percentage, of estimated debt, compared to the estimated time it would take to rewrite codeElement from scratch.
Syntax
[Extension()]
public static Nullable<double> DebtRatio( 
   ICodeElement codeElement
)

Parameters

codeElement
The code element on which we infer the percentage of debt.
Exceptions
ExceptionDescription
This extension method cannot be called from a program consuming NDepend.API. In such context, the method NDepend.Issue.IIssuesSet.DebtRatio must be called instead.
Remarks
This method implementation calls NDepend.TechnicalDebt.IDebtFormatter.NDepend.TechnicalDebt.IDebtFormatter.ToDebtRatio and returns null if NDepend.TechnicalDebt.IDebtFormatter.ToDebtRatio returns null, which happens when the PDB file is not found for the assembly containing codeElement, which means that NDepend.CodeModel.ExtensionMethodsHelpers.GetNbLinesOfCode_GuaranteedIfPDBFound 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