Show / Hide Table of Contents

Class DoubleDecoratorExtensions

Extension methods for the Double struct tailored to adhere the decorator pattern.

Inheritance
Object
DoubleDecoratorExtensions
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class DoubleDecoratorExtensions

Methods

| Improve this Doc View Source

ToTimeSpan(IDecorator<Double>, TimeUnit)

Converts the enclosed Double of the decorator to its equivalent TimeSpan representation.

Declaration
public static TimeSpan ToTimeSpan(this IDecorator<double> decorator, TimeUnit unitOfTime)
Parameters
Type Name Description
IDecorator<Double> decorator

The IDecorator<T> to extend.

TimeUnit unitOfTime

One of the enumeration values that specifies the outcome of the conversion.

Returns
Type Description
TimeSpan

A TimeSpan that corresponds to the enclosed Double of the decorator and unitOfTime.

Exceptions
Type Condition
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

IDecorator<T>
Decorator<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright 2008-2022 Geekle. All rights reserved. Code with passion and love; deploy with confidence. 👨‍💻️🔥❤️🚀😎
Generated by DocFX