Click or drag to resize

IConversionRatioToBaseProviderTUnit Interface

Provides methods for conversion from a unit to the base unit of a conversion ratio provider.

Namespace:  Aloe.EnterpriseOne.Model.Core.Metrics
Assembly:  Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntax
public interface IConversionRatioToBaseProvider<TUnit>
where TUnit : IUnitOfMeasure

Type Parameters

TUnit
The type of the unit.

The IConversionRatioToBaseProviderTUnit type exposes the following members.

Methods
  NameDescription
Public methodGetRatioToBaseOrDefault
Gets the conversion ratio from the specified unit to the base unit for this provider. Returns Zero if the ratio is not available.
Top
Extension Methods
Remarks
The primary idea of this interface is to simplify the conversion between arbitrary units of measure. The provider implements this interface, which only requires to provide conversion rate to the base unit of the provider. This is relatively easy for providers, whose conversions are based upon conversions through a base unit. Then, through extension method, the interface provides easy and safe way for the provider to imeplement the IConversionRatioProviderTUnit interface.
See Also