C# Class NFluent.Helpers.Duration

Represents a duration as an unit and a quantity.
Afficher le fichier Open project: tpierrain/NFluent Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

ConvertTo() public méthode

Gets a new instance for the same duration expressed in another TimeUnit
public ConvertTo ( TimeUnit newTmeUnit ) : Duration
newTmeUnit TimeUnit The target time unit.
Résultat Duration

ConvertToMilliseconds() public static méthode

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.
Résultat int

Duration() public méthode

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.
Résultat System

Duration() public méthode

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. ///
Résultat System

Equals() public méthode

Checks if the duration is equal to another one.
public Equals ( Duration other ) : bool
other Duration The duration to compare to.
Résultat bool

Equals() public méthode

Checks if the duration is equal to another object.
public Equals ( object obj ) : bool
obj object The duration to compare to.
Résultat bool

GetHashCode() public méthode

Gets the hash value of this instance.
public GetHashCode ( ) : int
Résultat int

ToString() public méthode

Returns a System.String that represents this instance.
public ToString ( ) : string
Résultat string

operator() public static méthode

Checks if duration a is less than duration b.
public static operator ( ) : bool
Résultat bool