Class BoundsRangeExtensions
- Namespace
- LfrlAnvil.Chrono.Extensions
- Assembly
- LfrlAnvil.Chrono.dll
Contains BoundsRange<T> extension methods.
public static class BoundsRangeExtensions
- Inheritance
-
BoundsRangeExtensions
- Inherited Members
Methods
GetDuration(BoundsRange<ZonedDateTime>)
Calculates the total Duration of the provided source
.
[Pure]
public static Duration GetDuration(this BoundsRange<ZonedDateTime> source)
Parameters
source
BoundsRange<ZonedDateTime>Source bounds range.
Returns
GetTimeSpan(BoundsRange<DateTime>)
Calculates the total TimeSpan of the provided source
.
[Pure]
public static TimeSpan GetTimeSpan(this BoundsRange<DateTime> source)
Parameters
source
BoundsRange<DateTime>Source bounds range.
Returns
Normalize(BoundsRange<ZonedDateTime>)
Creates a new BoundsRange<T> instance by merging neighbouring bounds together when Timestamp of Max of the first bounds and Timestamp of Min of the second bounds differ by 1 tick.
[Pure]
public static BoundsRange<ZonedDateTime> Normalize(this BoundsRange<ZonedDateTime> source)
Parameters
source
BoundsRange<ZonedDateTime>Source bounds range.
Returns
- BoundsRange<ZonedDateTime>
New BoundsRange<T> instance.
Remarks
See Normalize(Func<T, T, bool>) for more information.
Normalize(BoundsRange<ZonedDay>)
Creates a new BoundsRange<T> instance by merging neighbouring bounds together when Timestamp of End of Max of the first bounds and Timestamp of Start of Min of the second bounds differ by 1 tick.
[Pure]
public static BoundsRange<ZonedDay> Normalize(this BoundsRange<ZonedDay> source)
Parameters
source
BoundsRange<ZonedDay>Source bounds range.
Returns
- BoundsRange<ZonedDay>
New BoundsRange<T> instance.
Remarks
See Normalize(Func<T, T, bool>) for more information.
Normalize(BoundsRange<DateTime>)
Creates a new BoundsRange<T> instance by merging neighbouring bounds together when Max of the first bounds and Min of the second bounds differ by 1 tick.
[Pure]
public static BoundsRange<DateTime> Normalize(this BoundsRange<DateTime> source)
Parameters
source
BoundsRange<DateTime>Source bounds range.
Returns
- BoundsRange<DateTime>
New BoundsRange<T> instance.
Remarks
See Normalize(Func<T, T, bool>) for more information.