Table of Contents

Class ExtensionMethodsCQLinqDebtFormatter

Namespace
NDepend.Reserved.CQLinq
Assembly
NDepend.API.dll

Presents miscellaneous extension methods, that provide a syntax friendly way to gather data.

public static class ExtensionMethodsCQLinqDebtFormatter
Inheritance
ExtensionMethodsCQLinqDebtFormatter
Inherited Members

Remarks

These extension methods exist for CQLinq friendly syntax reasons and can only be called in a ICQLinqExecutionContext.
Indeed they all rely on a hidden IDebtFormatter object, hidden in CQLinq queries. This results in less syntax burden.
At CQLinq compilation time, the CQLinq compiler takes care of transforming calls to these extension methods into calls to the proper IDebtFormatter object.

Methods (26)

AnnualInterestThreshold(Severity)

Get the AnnualInterest threshold corresponding to the severity

public static AnnualInterest AnnualInterestThreshold(this Severity severity)

Parameters

severity Severity

The severity level to get the threshold from.

Returns

AnnualInterest

Remarks

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.AnnualInterestThreshold(Severity) must be called instead.

EffortToDevelop(ICodeElement)

Evaluate the total time to develop codeElement based on codeElement.GetNbLinesOfCode_GuaranteedIfPDBFound(ICodeElement), by applying a linear coefficent inferred from the project DebtSettings settings: EstimatedNumberOfManDayToDevelop1000LogicalLinesOfCode and NumberOfWorkHourPerDay.

public static TimeSpan? EffortToDevelop(this ICodeElement codeElement)

Parameters

codeElement ICodeElement

The code element on which to infer time-to-develop.

Returns

TimeSpan?

Remarks

This method returns null if codeElement.GetNbLinesOfCode_GuaranteedIfPDBFound(ICodeElement) returns null.

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.EffortToDevelop(ICodeElement) must be called instead.

See Also

ToManDay(AnnualInterest)

Gets a double number of man-days that represents annualInterest. The number of man-days is computed from the project DebtSettings.NumberOfWorkHourPerDay.

public static double ToManDay(this AnnualInterest annualInterest)

Parameters

annualInterest AnnualInterest

The estimated cost-per-year to leave one or several issues unfixed

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManDay(AnnualInterest) must be called instead.

ToManDay(Debt)

Gets a double number of man-days that represents debt. The number of man-days is computed from the project DebtSettings.NumberOfWorkHourPerDay.

public static double ToManDay(this Debt debt)

Parameters

debt Debt

The estimated effort to fix one or several issues

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManDay(Debt) must be called instead.

ToManDay(AnnualInterest?)

Gets a double number of man-days that represents annualInterest. The number of man-days is computed from the project DebtSettings.NumberOfWorkHourPerDay.

public static double? ToManDay(this AnnualInterest? annualInterest)

Parameters

annualInterest AnnualInterest?

The nullable estimated cost-per-year to leave one or several issues unfixed

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManDay(AnnualInterest?) must be called instead.

ToManDay(Debt?)

Gets a double number of man-days that represents debt. The number of man-days is computed from the project DebtSettings.NumberOfWorkHourPerDay.

public static double? ToManDay(this Debt? debt)

Parameters

debt Debt?

The nullable estimated effort to fix one or several issues

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManDay(Debt?) must be called instead.

ToManDay(TimeSpan?)

Gets a double number of man-days that represents duration. The number of man-days is computed from the project DebtSettings.NumberOfWorkHourPerDay.

public static double? ToManDay(this TimeSpan? duration)

Parameters

duration TimeSpan?

The nullable estimated duration to fix one or several issues

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManDay(TimeSpan) must be called instead.

ToManDay(TimeSpan)

Gets a double number of man-days that represents duration. The number of man-days is computed from the project DebtSettings.NumberOfWorkHourPerDay.

public static double ToManDay(this TimeSpan duration)

Parameters

duration TimeSpan

The estimated duration to fix one or several issues

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManDay(TimeSpan) must be called instead.

ToManMonth(AnnualInterest)

Gets a double number of man-months that represents annualInterest. The number of man-months is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double ToManMonth(this AnnualInterest annualInterest)

Parameters

annualInterest AnnualInterest

The estimated cost-per-year to leave one or several issues unfixed

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManMonth(AnnualInterest) must be called instead.

ToManMonth(Debt)

Gets a double number of man-months that represents debt. The number of man-months is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double ToManMonth(this Debt debt)

Parameters

debt Debt

The estimated effort to fix one or several issues

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManMonth(Debt) must be called instead.

ToManMonth(AnnualInterest?)

Gets a double number of man-months that represents annualInterest. The number of man-months is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double? ToManMonth(this AnnualInterest? annualInterest)

Parameters

annualInterest AnnualInterest?

The nullable estimated cost-per-year to leave one or several issues unfixed

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManMonth(AnnualInterest?) must be called instead.

ToManMonth(Debt?)

Gets a double number of man-months that represents debt. The number of man-months is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double? ToManMonth(this Debt? debt)

Parameters

debt Debt?

The nullable estimated effort to fix one or several issues

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManMonth(Debt?) must be called instead.

ToManMonth(TimeSpan?)

Gets a double number of man-months that represents duration. The number of man-months is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double? ToManMonth(this TimeSpan? duration)

Parameters

duration TimeSpan?

The nullable estimated duration to fix one or several issues

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManMonth(TimeSpan) must be called instead.

ToManMonth(TimeSpan)

Gets a double number of man-months that represents duration. The number of man-months is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double ToManMonth(this TimeSpan duration)

Parameters

duration TimeSpan

The estimated duration to fix one or several issues

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManMonth(TimeSpan) must be called instead.

ToManYear(AnnualInterest)

Gets a double number of man-years that represents annualInterest. The number of man-years is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double ToManYear(this AnnualInterest annualInterest)

Parameters

annualInterest AnnualInterest

The estimated cost-per-year to leave one or several issues unfixed

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManYear(AnnualInterest) must be called instead.

ToManYear(Debt)

Gets a double number of man-years that represents debt. The number of man-years is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double ToManYear(this Debt debt)

Parameters

debt Debt

The estimated effort to fix one or several issues

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManYear(Debt) must be called instead.

ToManYear(AnnualInterest?)

Gets a double number of man-years that represents annualInterest. The number of man-years is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double? ToManYear(this AnnualInterest? annualInterest)

Parameters

annualInterest AnnualInterest?

The nullable estimated cost-per-year to leave one or several issues unfixed

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManYear(AnnualInterest?) must be called instead.

ToManYear(Debt?)

Gets a double number of man-years that represents debt. The number of man-years is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double? ToManYear(this Debt? debt)

Parameters

debt Debt?

The nullable estimated effort to fix one or several issues

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManYear(Debt?) must be called instead.

ToManYear(TimeSpan?)

Gets a double number of man-years that represents duration. The number of man-years is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double? ToManYear(this TimeSpan? duration)

Parameters

duration TimeSpan?

The nullable estimated duration to fix one or several issues

Returns

double?

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManYear(TimeSpan) must be called instead.

ToManYear(TimeSpan)

Gets a double number of man-years that represents duration. The number of man-years is computed from this.DebtSettings.NumberOfWorkHourPerDay and this.DebtSettings.NumberOfWorkDayPerYear.

public static double ToManYear(this TimeSpan duration)

Parameters

duration TimeSpan

The estimated duration to fix one or several issues

Returns

double

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToManYear(TimeSpan) must be called instead.

ToMoney(AnnualInterest)

Estimate an amount of money from an annualInterest.

public static double ToMoney(this AnnualInterest annualInterest)

Parameters

annualInterest AnnualInterest

The estimated cost-per-year to leave one or several issues unfixed

Returns

double

Remarks

The amount of money is expressed in the project's DebtSettings.Currency and is computed from the project's DebtSettings.MoneyPerManHour.

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToMoney(AnnualInterest) must be called instead.

ToMoney(Debt)

Estimate an amount of money from a debt.

public static double ToMoney(this Debt debt)

Parameters

debt Debt

The estimated effort to fix one or several issues

Returns

double

Remarks

The amount of money is expressed in the project's DebtSettings.Currency and is computed from the project's DebtSettings.MoneyPerManHour.

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToMoney(Debt) must be called instead.

ToMoney(AnnualInterest?)

Estimate an amount of money from an annualInterest.

public static double? ToMoney(this AnnualInterest? annualInterest)

Parameters

annualInterest AnnualInterest?

The nullable estimated cost-per-year to leave one or several issues unfixed

Returns

double?

Remarks

The amount of money is expressed in the project's DebtSettings.Currency and is computed from the project's DebtSettings.MoneyPerManHour.

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToMoney(AnnualInterest?) must be called instead.

ToMoney(Debt?)

Estimate an amount of money from a debt.

public static double? ToMoney(this Debt? debt)

Parameters

debt Debt?

The nullable estimated effort to fix one or several issues

Returns

double?

Remarks

The amount of money is expressed in the project's DebtSettings.Currency and is computed from the project's DebtSettings.MoneyPerManHour.

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToMoney(Debt?) must be called instead.

ToMoney(TimeSpan?)

Estimate an amount of money from a duration.

public static double? ToMoney(this TimeSpan? duration)

Parameters

duration TimeSpan?

The nullable estimated duration to fix one or several issues

Returns

double?

Remarks

The amount of money is expressed in the project's DebtSettings.Currency and is computed from the project's DebtSettings.MoneyPerManHour.

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToMoney(TimeSpan) must be called instead.

ToMoney(TimeSpan)

Estimate an amount of money from a duration.

public static double ToMoney(this TimeSpan duration)

Parameters

duration TimeSpan

The estimated duration to fix one or several issues

Returns

double

Remarks

The amount of money is expressed in the project's DebtSettings.Currency and is computed from the project's DebtSettings.MoneyPerManHour.

Exceptions

NotImplementedException

This extension method cannot be called from a program consuming NDepend.API. In such context, the method IDebtFormatter.ToMoney(TimeSpan) must be called instead.