Class MultiTransitionDateTimeZone.Builder
Builder to create instances of MultiTransitionDateTimeZone. Each builder
can only be built once.
Since 1.1.x
Availability net45, netstandard1.3
Inheritance
Object
MultiTransitionDateTimeZone.Builder
Implements
IEnumerable
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime.Testing.TimeZones
Assembly: NodaTime.Testing.dll
Syntax
public sealed class Builder : IEnumerable
Constructors
Builder()
Constructs a builder using an ID of "MultiZone", an initial offset of zero (standard and savings),
and an initial name of "First".
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public Builder()
Builder(Int32, Int32)
Constructs a builder using the given standard offset and saving offset. The ID is initially "MultiZone".
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public Builder(int firstStandardOffsetHours, int firstSavingOffsetHours)
Parameters
Type | Name | Description |
---|---|---|
Int32 | firstStandardOffsetHours | Standard offset in hours in the first zone interval. |
Int32 | firstSavingOffsetHours | Standard offset in hours in the first zone interval. |
Builder(Int32, Int32, String)
Constructs a builder using the given first name, standard offset, and daylight saving offset.
The ID is initially "MultiZone".
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public Builder(int firstStandardOffsetHours, int firstSavingOffsetHours, string firstName)
Parameters
Type | Name | Description |
---|---|---|
Int32 | firstStandardOffsetHours | Standard offset in hours in the first zone interval. |
Int32 | firstSavingOffsetHours | Daylight saving offset in hours in the first zone interval. |
String | firstName | Name of the first zone interval. |
Builder(Int32, String)
Constructs a builder using the given first name, standard offset, and a daylight saving
offset of 0. The ID is initially "MultiZone".
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public Builder(int firstOffsetHours, string firstName)
Parameters
Type | Name | Description |
---|---|---|
Int32 | firstOffsetHours | Standard offset in hours in the first zone interval. |
String | firstName | Name of the first zone interval. |
Properties
Id
Gets the ID of the time zone which will be built.
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
String | The ID of the time zone which will be built. |
Methods
Add(Instant, Int32)
Adds a transition at the given instant, to the specified new standard offset,
with no daylight saving. The name is generated from the transition.
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public void Add(Instant transition, int newStandardOffsetHours)
Parameters
Type | Name | Description |
---|---|---|
Instant | transition | Instant at which the zone changes. |
Int32 | newStandardOffsetHours | The new standard offset, in hours. |
Add(Instant, Int32, Int32)
Adds a transition at the given instant, to the specified new standard offset,
with the new specified daylight saving. The name is generated from the transition.
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public void Add(Instant transition, int newStandardOffsetHours, int newSavingOffsetHours)
Parameters
Type | Name | Description |
---|---|---|
Instant | transition | Instant at which the zone changes. |
Int32 | newStandardOffsetHours | The new standard offset, in hours. |
Int32 | newSavingOffsetHours | The new daylight saving offset, in hours. |
Add(Instant, Int32, Int32, String)
Adds a transition at the given instant, to the specified new standard offset,
with the new specified daylight saving. The name is generated from the transition.
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public void Add(Instant transition, int newStandardOffsetHours, int newSavingOffsetHours, string newName)
Parameters
Type | Name | Description |
---|---|---|
Instant | transition | Instant at which the zone changes. |
Int32 | newStandardOffsetHours | The new standard offset, in hours. |
Int32 | newSavingOffsetHours | The new daylight saving offset, in hours. |
String | newName | The new zone interval name. |
Build()
Builds a MultiTransitionDateTimeZone from this builder, invalidating it in the process.
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public MultiTransitionDateTimeZone Build()
Returns
Type | Description |
---|---|
MultiTransitionDateTimeZone | The newly-built zone. |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
We don't *really* want to implement this, but we want the collection initializer...
Since 1.1.x
Availability net45, netstandard1.3
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator |
Implements
System.Collections.IEnumerable