Class MapZone
Represents a single <mapZone>
element in the CLDR Windows zone mapping file.
Since 1.1.x
Availability net6.0, netstandard2.0
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 net6.0, 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. |
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 net6.0, netstandard2.0
Declaration
public const string FixedOffsetTerritory = "ZZ"
Field Value
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 net6.0, netstandard2.0
Declaration
public const string PrimaryTerritory = "001"
Field Value
Properties
Territory
Gets the territory code for this mapping.
Since 1.1.x
Availability net6.0, netstandard2.0
Declaration
public string Territory { get; }
Property Value
Type |
Description |
string |
The territory code for this mapping. |
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 net6.0, 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. |
WindowsId
Gets the Windows system time zone identifier for this mapping, such as "Central Standard Time".
Since 1.1.x
Availability net6.0, 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". |
Methods
Equals(MapZone?)
Compares two
MapZone values for equality.
See the type documentation for a description of equality semantics.
Since 2.0.x
Availability net6.0, netstandard2.0
Declaration
public bool Equals(MapZone? other)
Parameters
Type |
Name |
Description |
MapZone |
other |
The value to compare this map zone with. |
Returns
Type |
Description |
bool |
True if the given value is another map zone equal to this one; false otherwise. |
Equals(object?)
Compares two
MapZone values for equality.
See the type documentation for a description of equality semantics.
Since 2.0.x
Availability net6.0, netstandard2.0
Declaration
public override bool Equals(object? obj)
Parameters
Type |
Name |
Description |
object |
obj |
The value to compare this map zone with. |
Returns
Type |
Description |
bool |
True if the given value is another map zone equal to this one; false otherwise. |
Overrides
GetHashCode()
Returns a hash code for this map zone.
See the type documentation for a description of equality semantics.
Since 2.0.x
Availability net6.0, netstandard2.0
Declaration
public override int GetHashCode()
Returns
Type |
Description |
int |
A hash code for this map zone. |
Overrides
ToString()
Returns a
String that represents this instance.
Since 2.0.x
Availability net6.0, netstandard2.0
Declaration
public override string ToString()
Returns
Type |
Description |
string |
The value of the current instance, for diagnostic purposes.
|
Overrides
Implements