Table of Contents

Class Range<T>

Namespace
Cuemon
Assembly
Cuemon.Core.dll

Represents a period of time between two T.

public abstract class Range<T> : IEqualityComparer<Range<T>> where T : IFormattable

Type Parameters

T

The type of the time measurement.

Inheritance
Object
Range<T>
Implements
IEqualityComparer<Range<T>>
Derived

Constructors

Range(T, T, Func<TimeSpan>)

Initializes a new instance of the Range<T> class.

protected Range(T start, T end, Func<TimeSpan> durationResolver)

Parameters

start T

The start.

end T

The end.

durationResolver Func<TimeSpan>

The duration resolver.

Properties

Duration

Gets the duration between Start and End.

public TimeSpan Duration { get; }

Property Value

TimeSpan

A System.TimeSpan representing the duration between Start and End.

End

Gets the point of time where this time range end.

public T End { get; }

Property Value

T

A value representing the point of time where this time range end.

Start

Gets the point of time where this time range begin.

public T Start { get; }

Property Value

T

A value representing the point of time where this time range begin.

Methods

Equals(Range<T>, Range<T>)

Determines whether the specified objects are equal.

public bool Equals(Range<T> x, Range<T> y)

Parameters

x Range<T>

The first object of type T to compare.

y Range<T>

The second object of type T to compare.

Returns

Boolean

true if the specified objects are equal; otherwise, false.

GetHashCode(Range<T>)

Returns a hash code for this instance.

public int GetHashCode(Range<T> obj)

Parameters

obj Range<T>

The System.Object for which a hash code is to be returned.

Returns

Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

ToString(String, IFormatProvider)

Returns a System.String that represents this instance.

public virtual string ToString(string format, IFormatProvider provider)

Parameters

format String

A composite format string for the T properties.

provider IFormatProvider

An object that supplies culture-specific formatting information.

Returns

String

A System.String that represents this instance.

See Also

Range<T>