Class ExtensionMethodsCQLinqDebtFormatter
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
severitySeverityThe severity level to get the threshold from.
Returns
Remarks
AnnualInterest.Zero is returned for Severity.Low.
The DebtSettings.Low2MediumSeverityThreshold is returned for Severity.Medium.
The DebtSettings.Medium2HighSeverityThreshold is returned for Severity.High.
The DebtSettings.High2CriticalSeverityThreshold is returned for Severity.Critical.
The DebtSettings.Critical2Blocker_SeverityThreshold is returned for Severity.Blocker.
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
codeElementICodeElementThe code element on which to infer time-to-develop.
Returns
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
annualInterestAnnualInterestThe estimated cost-per-year to leave one or several issues unfixed
Returns
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
debtDebtThe estimated effort to fix one or several issues
Returns
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
annualInterestAnnualInterest?The nullable estimated cost-per-year to leave one or several issues unfixed
Returns
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
debtDebt?The nullable estimated effort to fix one or several issues
Returns
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
durationTimeSpan?The nullable estimated duration to fix one or several issues
Returns
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
durationTimeSpanThe estimated duration to fix one or several issues
Returns
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
annualInterestAnnualInterestThe estimated cost-per-year to leave one or several issues unfixed
Returns
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
debtDebtThe estimated effort to fix one or several issues
Returns
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
annualInterestAnnualInterest?The nullable estimated cost-per-year to leave one or several issues unfixed
Returns
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
debtDebt?The nullable estimated effort to fix one or several issues
Returns
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
durationTimeSpan?The nullable estimated duration to fix one or several issues
Returns
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
durationTimeSpanThe estimated duration to fix one or several issues
Returns
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
annualInterestAnnualInterestThe estimated cost-per-year to leave one or several issues unfixed
Returns
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
debtDebtThe estimated effort to fix one or several issues
Returns
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
annualInterestAnnualInterest?The nullable estimated cost-per-year to leave one or several issues unfixed
Returns
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
debtDebt?The nullable estimated effort to fix one or several issues
Returns
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
durationTimeSpan?The nullable estimated duration to fix one or several issues
Returns
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
durationTimeSpanThe estimated duration to fix one or several issues
Returns
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
annualInterestAnnualInterestThe estimated cost-per-year to leave one or several issues unfixed
Returns
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
debtDebtThe estimated effort to fix one or several issues
Returns
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
annualInterestAnnualInterest?The nullable estimated cost-per-year to leave one or several issues unfixed
Returns
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
debtDebt?The nullable estimated effort to fix one or several issues
Returns
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
durationTimeSpan?The nullable estimated duration to fix one or several issues
Returns
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
durationTimeSpanThe estimated duration to fix one or several issues
Returns
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.