Show / Hide Table of Contents

Class Range<T>

Represents a period of time between two T.

Inheritance
Object
Range<T>
DateTimeRange
TimeRange
Implements
IEqualityComparer<Range<T>>
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 Source

Range(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 Source

Duration

Gets the duration between Start and End.

Declaration
public TimeSpan Duration { get; }
Property Value
Type Description
TimeSpan

A TimeSpan representing the duration between Start and End.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Equals(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 T to compare.

Range<T> y

The second object of type T to compare.

Returns
Type Description
Boolean

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

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 T properties.

IFormatProvider provider

An object that supplies culture-specific formatting information.

Returns
Type Description
String

A String that represents this instance.

Implements

System.Collections.Generic.IEqualityComparer<T>

See Also

Range<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright 2008-2022 Geekle. All rights reserved. Code with passion and love; deploy with confidence. 👨‍💻️🔥❤️🚀😎
Generated by DocFX