Class TimeRangeExtensions
Time range extensions.
Inheritance
System.Object
TimeRangeExtensions
Namespace: MAT.Atlas.Api.Core.Extensions
Assembly: MAT.Atlas.Api.Core.dll
Syntax
public static class TimeRangeExtensions : Object
Methods
IsGreaterThan(TimeRange, Int64)
Is time range greater than given time.
Declaration
public static bool IsGreaterThan(this TimeRange timeRange, long time)
Parameters
Type | Name | Description |
---|---|---|
TimeRange | timeRange | The time range. |
System.Int64 | time | The time (in nanoseconds). |
Returns
Type | Description |
---|---|
System.Boolean | true if greater than else false. |
IsValid(TimeRange)
Is time range valid?
Declaration
public static bool IsValid(this TimeRange timeRange)
Parameters
Type | Name | Description |
---|---|---|
TimeRange | timeRange | The time range. |
Returns
Type | Description |
---|---|
System.Boolean | true if valid else false. |
MergeOverLaps(IEnumerable<TimeRange>)
Merges successive and overlapping timeranges
Declaration
public static IList<TimeRange> MergeOverLaps(this IEnumerable<TimeRange> timeRanges)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TimeRange> | timeRanges | Time ranges to merge |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<TimeRange> | Merged time ranges |