Class DoubleDecoratorExtensions
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Extension methods for the System.Double struct hidden behind the IDecorator<T> interface.
public static class DoubleDecoratorExtensions
- Inheritance
-
ObjectDoubleDecoratorExtensions
Methods
ToTimeSpan(IDecorator<Double>, TimeUnit)
Converts the enclosed System.Double of the decorator
to its equivalent System.TimeSpan representation.
public static TimeSpan ToTimeSpan(this IDecorator<double> decorator, TimeUnit unitOfTime)
Parameters
decorator
IDecorator<Double>The IDecorator<T> to extend.
unitOfTime
TimeUnitOne of the enumeration values that specifies the outcome of the conversion.
Returns
- TimeSpan
A System.TimeSpan that corresponds to the enclosed System.Double of the
decorator
andunitOfTime
.
Exceptions
- System.ArgumentNullException
decorator
cannot be null.- System.OverflowException
The enclosed System.Double of the
decorator
paired withunitOfTime
is outside its valid range.- System.ComponentModel.InvalidEnumArgumentException
unitOfTime
was outside its valid range.
See Also
IDecorator<T>
Decorator<T>