Class MapZone
Represents a single
<mapZone>
element in the CLDR Windows zone mapping file.
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Inheritance
Object
MapZone
Implements
IEquatable<MapZone>
Inherited Members
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime.TimeZones.Cldr
Assembly: NodaTime.dll
Syntax
public sealed class MapZone : IEquatable<MapZone>
Constructors
MapZone(String, String, IList<String>)
Creates a new mapping entry.
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public MapZone(string windowsId, string territory, IList<string> tzdbIds)
Parameters
Type | Name | Description |
---|---|---|
String | windowsId | Windows system time zone identifier. Must not be null. |
String | territory | Territory code. Must not be null. |
IList<String> | tzdbIds | List of territory codes. Must not be null, and must not contains null values. |
Remarks
This constructor is only public for the sake of testability.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | windowsId, territory or tzdbIds is null |
Fields
FixedOffsetTerritory
Identifier used for the "fixed offset" territory. A zone mapping with
this territory will always have a single entry. The value of this constant is "ZZ".
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public const string FixedOffsetTerritory = "ZZ"
Field Value
Type | Description |
---|---|
String |
PrimaryTerritory
Identifier used for the primary territory of each Windows time zone. A zone mapping with
this territory will always have a single entry. The value of this constant is "001".
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public const string PrimaryTerritory = "001"
Field Value
Type | Description |
---|---|
String |
Properties
Territory
Gets the territory code for this mapping.
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public string Territory { get; }
Property Value
Type | Description |
---|---|
String | The territory code for this mapping. (The value returned is never null.) |
Remarks
This is typically either "001" to indicate that it's the primary territory for this ID, or
"ZZ" to indicate a fixed-offset ID, or a different two-character capitalized code
which indicates the geographical territory.
TzdbIds
Gets a read-only non-empty collection of TZDB zone identifiers for this mapping, such as
"America/Chicago" and "America/Matamoros" (both of which are TZDB zones associated with the "Central Standard Time"
Windows system time zone).
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public IList<string> TzdbIds { get; }
Property Value
Type | Description |
---|---|
IList<String> | A read-only non-empty collection of TZDB zone identifiers for this mapping. (The value returned is never null.) |
Remarks
For the primary and fixed-offset territory IDs ("001" and "ZZ") this always
contains exactly one time zone ID.
WindowsId
Gets the Windows system time zone identifier for this mapping, such as "Central Standard Time".
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public string WindowsId { get; }
Property Value
Type | Description |
---|---|
String | The Windows system time zone identifier for this mapping, such as "Central Standard Time". (The value returned is never null.) |
Remarks
Most Windows system time zone identifiers use the name for the "standard" part of the zone as the overall identifier. Don't be fooled: just because a time zone includes "standard" in its identifier doesn't mean that it doesn't observe daylight saving time.
Methods
Equals(MapZone)
Since 2.0.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public bool Equals(MapZone other)
Parameters
Type | Name | Description |
---|---|---|
MapZone | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Since 2.0.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Since 2.0.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
System.Object.GetHashCode()
ToString()
Since 2.0.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
System.Object.ToString()
Implements
System.IEquatable<T>