C# Класс NFluent.Helpers.Duration

Represents a duration as an unit and a quantity.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ConvertTo ( TimeUnit newTmeUnit ) : Duration

Gets a new instance for the same duration expressed in another TimeUnit

ConvertToMilliseconds ( double duration, TimeUnit durationTimeUnit ) : int

Converts a given duration to a number of milliseconds.

Duration ( System.TimeSpan timeSpan, TimeUnit unit ) : System

Initializes a new instance of the Duration struct.

Duration ( double rawDuration, TimeUnit timeUnit ) : System

Initializes a new instance of the Duration struct.

Equals ( Duration other ) : bool

Checks if the duration is equal to another one.

Equals ( object obj ) : bool

Checks if the duration is equal to another object.

GetHashCode ( ) : int

Gets the hash value of this instance.

ToString ( ) : string

Returns a System.String that represents this instance.

operator ( ) : bool

Checks if duration a is less than duration b.

Описание методов

ConvertTo() публичный Метод

Gets a new instance for the same duration expressed in another TimeUnit
public ConvertTo ( TimeUnit newTmeUnit ) : Duration
newTmeUnit TimeUnit The target time unit.
Результат Duration

ConvertToMilliseconds() публичный статический Метод

Converts a given duration to a number of milliseconds.
public static ConvertToMilliseconds ( double duration, TimeUnit durationTimeUnit ) : int
duration double The duration value.
durationTimeUnit TimeUnit The time unit of the duration.
Результат int

Duration() публичный Метод

Initializes a new instance of the Duration struct.
public Duration ( System.TimeSpan timeSpan, TimeUnit unit ) : System
timeSpan System.TimeSpan The time span.
unit TimeUnit The time unit.
Результат System

Duration() публичный Метод

Initializes a new instance of the Duration struct.
public Duration ( double rawDuration, TimeUnit timeUnit ) : System
rawDuration double /// Duration of the raw. ///
timeUnit TimeUnit /// The time unit. ///
Результат System

Equals() публичный Метод

Checks if the duration is equal to another one.
public Equals ( Duration other ) : bool
other Duration The duration to compare to.
Результат bool

Equals() публичный Метод

Checks if the duration is equal to another object.
public Equals ( object obj ) : bool
obj object The duration to compare to.
Результат bool

GetHashCode() публичный Метод

Gets the hash value of this instance.
public GetHashCode ( ) : int
Результат int

ToString() публичный Метод

Returns a System.String that represents this instance.
public ToString ( ) : string
Результат string

operator() публичный статический Метод

Checks if duration a is less than duration b.
public static operator ( ) : bool
Результат bool