Table of Contents

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
Object
DoubleDecoratorExtensions

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 TimeUnit

One 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 and unitOfTime.

Exceptions

System.ArgumentNullException

decorator cannot be null.

System.OverflowException

The enclosed System.Double of the decorator paired with unitOfTime is outside its valid range.

System.ComponentModel.InvalidEnumArgumentException

unitOfTime was outside its valid range.

See Also