Table of Contents

Class ZoneGenerator

Namespace
Hegel.Temporal
Assembly
Hegel.dll

Draws time zones, shrinking toward UTC: the zones of a ZoneSource that this system has a TimeZoneInfo for. The source is the one Source(ZoneSource) names, or else Default as it was when the generator was created. See Zones() for how bad arguments are reported.

public sealed class ZoneGenerator : ValueGenerator<TimeZoneInfo>
Inheritance
ZoneGenerator
Inherited Members

Methods

AllowLegacy(bool)

Whether legacy names such as EST5EDT and US/Eastern are drawn (they are not by default).

public ZoneGenerator AllowLegacy(bool allow)

Parameters

allow bool

Returns

ZoneGenerator

Whether link names such as Asia/Calcutta, another name for Asia/Kolkata, are drawn (they are by default).

public ZoneGenerator AllowLinks(bool allow)

Parameters

allow bool

Returns

ZoneGenerator

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 TimeZoneInfo DoDraw(TestCase tc)

Parameters

tc TestCase

Returns

TimeZoneInfo

Names(params string[])

Draw only these names, each exactly as the zone source spells it. AllowLinks(bool) and AllowLegacy(bool) do not apply to an explicit list.

public ZoneGenerator Names(params string[] names)

Parameters

names string[]

Returns

ZoneGenerator

Exceptions

ArgumentException

names is empty; or, when Source(ZoneSource) has named the zone source, it lacks one of the names or this system has no TimeZoneInfo for one.

Source(ZoneSource)

Draw the zones of source rather than of the default zone source.

public ZoneGenerator Source(ZoneSource source)

Parameters

source ZoneSource

Returns

ZoneGenerator

Exceptions

ArgumentException

source lacks a name given to Names(params string[]), this system has no TimeZoneInfo for one or for any zone of source.