Table of Contents

Class ExtensionMethodsDebt

Namespace
NDepend.TechnicalDebt
Assembly
NDepend.API.dll

This static class provides various extension methods related to Debt objects.

public static class ExtensionMethodsDebt
Inheritance
ExtensionMethodsDebt
Inherited Members

Methods (4)

CreateDebtFormatter(DebtSettings)

Create a IDebtFormatter object from this debt settings object.

public static IDebtFormatter CreateDebtFormatter(this DebtSettings debtSettings)

Parameters

debtSettings DebtSettings

The DebtSettings object from which to get the IDebtFormatter object.

Returns

IDebtFormatter

Remarks

The IDebtFormatter object store a cloned copy of debtSettings.
If this debtSettings are changing, the settings contained in the returned IDebtFormatter object are not changed.

GetImage<T>(Severity)

Get the image that represents the severity level.

public static T GetImage<T>(this Severity severity) where T : class

Parameters

severity Severity

The severity level.

Returns

T

Type Parameters

T

So far the GetImage<T>() parameter type T must be System.Drawing.Image. This requirement might evolve in future version when other UI framework will be supported.

ToBackColor(DebtRating)

Convert the debtRating to a back color.

public static NdpColor ToBackColor(this DebtRating debtRating)

Parameters

debtRating DebtRating

The DebtRating value.

Returns

NdpColor

Remarks

Strong green (RGB: 51;204;51) is returned for the value DebtRating.A.
Light green (RGB: 153;255;101) is returned for the value DebtRating.B.
Yellow (RGB: 255;255;0) is returned for the value DebtRating.C.
Orange (RGB: 255;153;0) is returned for the value DebtRating.D.
Red (RGB: 255;0;0) is returned for the value DebtRating.E.

ToForeColor(DebtRating)

Convert the debtRating to a fore color.

public static NdpColor ToForeColor(this DebtRating debtRating)

Parameters

debtRating DebtRating

The DebtRating value.

Returns

NdpColor

Remarks

Black is returned for DebtRating.A, B, C and D.
White is returned for the value DebtRating.E.