Interface IConverter<TValue>
- Namespace
- xFunc.Maths.Expressions.Units.Converters
- Assembly
- xFunc.Maths.dll
The interface for unit converter.
public interface IConverter<out TValue>
Type Parameters
TValue
The type of return value of converter.
Methods
CanConvertTo(object, string)
Determines whether the current converter can convert to specified unit.
bool CanConvertTo(object value, string unit)
Parameters
Returns
- bool
true
if converter can convert usingunit
; otherwise,false
.
Convert(object, string)
Converts value
to specified unit
.
TValue Convert(object value, string unit)
Parameters
Returns
- TValue
The converter value.