Table of Contents

Class DoubleDecoratorExtensions

Namespace
Cuemon
Assembly
Cuemon.Core.dll

Extension methods for the Double struct hidden behind the IDecorator<T> interface.

public static class DoubleDecoratorExtensions
Inheritance
DoubleDecoratorExtensions

Methods

ToTimeSpan(IDecorator<Double>, TimeUnit)

Converts the enclosed Double of the decorator to its equivalent 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 TimeSpan that corresponds to the enclosed Double of the decorator and unitOfTime.

Exceptions

ArgumentNullException

decorator cannot be null.

OverflowException

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

InvalidEnumArgumentException

unitOfTime was outside its valid range.

See Also