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
-
Range<T>
- Implements
- 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
Properties
Duration
public TimeSpan Duration { get; }
Property Value
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
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 String that represents this instance.
public virtual string ToString(string format, IFormatProvider provider)
Parameters
format
StringA composite format string for the
T
properties.provider
IFormatProviderAn object that supplies culture-specific formatting information.