Class InstantGenerator
Draws instants, as DateTimeOffsets with a zero offset, shrinking toward 2000-01-01T00:00Z. See Dates() for how bad arguments are reported.
public sealed class InstantGenerator : ValueGenerator<DateTimeOffset>
- Inheritance
-
InstantGenerator
- Inherited Members
Methods
DoDraw(TestCase)
Draw one value. Called inside a span labelled Label: draw from another generator through DrawSilent<T>(Generator<T>), which opens its span, rather than by calling its hook.
protected override DateTimeOffset DoDraw(TestCase tc)
Parameters
tcTestCase
Returns
Max(DateTimeOffset)
No later than max.
public InstantGenerator Max(DateTimeOffset max)
Parameters
maxDateTimeOffset
Returns
Exceptions
- ArgumentException
The settings given so far allow no instant.
Min(DateTimeOffset)
No earlier than min.
public InstantGenerator Min(DateTimeOffset min)
Parameters
minDateTimeOffset
Returns
Exceptions
- ArgumentException
The settings given so far allow no instant.
Precision(Precision)
Only whole numbers of precision since the Unix epoch, rather than of ticks.
public InstantGenerator Precision(Precision precision)
Parameters
precisionPrecision
Returns
Exceptions
- ArgumentException
precisionis not a precision, or the settings given so far allow no instant.