Table of Contents

Class InstantGenerator

Namespace
Hegel.Temporal
Assembly
Hegel.dll

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

tc TestCase

Returns

DateTimeOffset

Max(DateTimeOffset)

No later than max.

public InstantGenerator Max(DateTimeOffset max)

Parameters

max DateTimeOffset

Returns

InstantGenerator

Exceptions

ArgumentException

The settings given so far allow no instant.

Min(DateTimeOffset)

No earlier than min.

public InstantGenerator Min(DateTimeOffset min)

Parameters

min DateTimeOffset

Returns

InstantGenerator

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

precision Precision

Returns

InstantGenerator

Exceptions

ArgumentException

precision is not a precision, or the settings given so far allow no instant.