Class TimeQuery.Series
public sealed record TimeQuery.Series : TimeQuery, IEquatable<TimeQuery>, IEquatable<TimeQuery.Series>
- Inheritance
-
TimeQuery.Series
- Implements
- Inherited Members
Constructors
Series(DateTimeOffset, DateTimeOffset, TimeSpan)
public Series(DateTimeOffset From, DateTimeOffset To, TimeSpan Step)
Parameters
FromDateTimeOffsetFirst instant in the series.
ToDateTimeOffsetLast instant the series may not exceed.
StepTimeSpanCadence between successive instants; must be > Zero.
Properties
EstimatedCount
Number of instants that Enumerate() would produce,
without materialising them. Always at least 1 when From == To.
public int EstimatedCount { get; }
Property Value
From
First instant in the series.
public DateTimeOffset From { get; init; }
Property Value
Step
Cadence between successive instants; must be > Zero.
public TimeSpan Step { get; init; }
Property Value
To
Last instant the series may not exceed.
public DateTimeOffset To { get; init; }
Property Value
Methods
Enumerate()
Materialises the series as an immutable array. Throws InvalidOperationException if the count would exceed MaxSeriesCount.
public IReadOnlyList<DateTimeOffset> Enumerate()