Class DateTimeZoneCache
Provides a stable cache for time zone sources.
Since 1.0.x
Availability net35-Client, PCL
Inheritance
Object
DateTimeZoneCache
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Assembly: NodaTime.dll
Syntax
public sealed class DateTimeZoneCache : IDateTimeZoneProvider
Constructors
DateTimeZoneCache(IDateTimeZoneSource)
Since 1.0.x
Availability net35-Client, PCL
Declaration
public DateTimeZoneCache(IDateTimeZoneSource source)
Parameters
Exceptions
Properties
Ids
Gets the list of valid time zone ids advertised by this provider.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public ReadOnlyCollection<string> Ids { get; }
Property Value
Type |
Description |
ReadOnlyCollection<String> |
The System.Collections.Generic.IEnumerable<T> of string ids. |
Item[String]
Returns the time zone for the given ID.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public DateTimeZone this[string id] { get; }
Parameters
Type |
Name |
Description |
String |
id |
The time zone id to find. |
Property Value
Exceptions
VersionId
The version ID of this provider.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public string VersionId { get; }
Property Value
Methods
GetSystemDefault()
Gets the time zone from this provider that matches the system default time zone, if a matching time zone is
available.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public DateTimeZone GetSystemDefault()
Returns
Type |
Description |
DateTimeZone |
The provider-specific representation of the system default time zone.
|
Exceptions
GetZoneOrNull(String)
Returns the time zone for the given ID, if it's available.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public DateTimeZone GetZoneOrNull(string id)
Parameters
Type |
Name |
Description |
String |
id |
The time zone ID to find. |
Returns
Exceptions
Type |
Condition |
System.ArgumentNullException |
id is null. |
Implements