Class Range<T>
Represents a period of time between two T
.
Implements
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public abstract class Range<T> : IEqualityComparer<Range<T>> where T : IFormattable
Type Parameters
Name | Description |
---|---|
T | The type of the time measurement. |
Constructors
| Improve this Doc View SourceRange(T, T, Func<TimeSpan>)
Initializes a new instance of the Range<T> class.
Declaration
protected Range(T start, T end, Func<TimeSpan> durationResolver)
Parameters
Type | Name | Description |
---|---|---|
T | start | The start. |
T | end | The end. |
Func<TimeSpan> | durationResolver | The duration resolver. |
Properties
| Improve this Doc View SourceDuration
Declaration
public TimeSpan Duration { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
End
Gets the point of time where this time range end.
Declaration
public T End { get; }
Property Value
Type | Description |
---|---|
T | A value representing the point of time where this time range end. |
Start
Gets the point of time where this time range begin.
Declaration
public T Start { get; }
Property Value
Type | Description |
---|---|
T | A value representing the point of time where this time range begin. |
Methods
| Improve this Doc View SourceEquals(Range<T>, Range<T>)
Determines whether the specified objects are equal.
Declaration
public bool Equals(Range<T> x, Range<T> y)
Parameters
Type | Name | Description |
---|---|---|
Range<T> | x | The first object of type |
Range<T> | y | The second object of type |
Returns
Type | Description |
---|---|
Boolean | true if the specified objects are equal; otherwise, false. |
GetHashCode(Range<T>)
Returns a hash code for this instance.
Declaration
public int GetHashCode(Range<T> obj)
Parameters
Type | Name | Description |
---|---|---|
Range<T> | obj | The Object for which a hash code is to be returned. |
Returns
Type | Description |
---|---|
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.
Declaration
public virtual string ToString(string format, IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
String | format | A composite format string for the |
IFormatProvider | provider | An object that supplies culture-specific formatting information. |
Returns
Type | Description |
---|---|
String | A String that represents this instance. |