Click or drag to resize

ConversionRatioToBaseProviderStaticMethodsGetRatioThroughBaseOrDefaultTUnit Method

Gets the conversion ratio from the source to the destination unit. The ratio is calculated through the base unit. If the ratio is not available, Zero is returned.

Namespace:  Aloe.EnterpriseOne.Model.Core.Metrics
Assembly:  Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntax
public static ConversionRatio GetRatioThroughBaseOrDefault<TUnit>(
	this IConversionRatioToBaseProvider<TUnit> ratioProvider,
	TUnit sourceUnit,
	TUnit destinationUnit
)
where TUnit : EntityObject, IUnitOfMeasure

Parameters

ratioProvider
Type: Aloe.EnterpriseOne.Model.Core.MetricsIConversionRatioToBaseProviderTUnit
The ratio provider.
sourceUnit
Type: TUnit
The source unit.
destinationUnit
Type: TUnit
The destination unit.

Type Parameters

TUnit
The type of the unit.

Return Value

Type: ConversionRatio
The ConversionRatio from the source to the destination unit.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IConversionRatioToBaseProviderTUnit. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also