Class Resolvers
"Constant" fields representing commonly-used implementations of the resolver delegates,
and a method to combine two "partial" resolvers into a full one.
Since 1.0.x
Availability net35-Client
Inheritance
Object
Resolvers
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime.TimeZones
Assembly: NodaTime.dll
Syntax
public static class Resolvers
Fields
LenientResolver
ZoneLocalMappingResolver which never throws an exception due to ambiguity or skipped time.
Ambiguity is handled by returning the later occurrence, and skipped times are mapped to the start of the zone interval
after the gap. This resolver combines ReturnLater and ReturnStartOfIntervalAfter.
Since 1.0.x
Availability net35-Client
Declaration
public static readonly ZoneLocalMappingResolver LenientResolver
Field Value
Type | Description |
---|---|
ZoneLocalMappingResolver |
ReturnEarlier
AmbiguousTimeResolver which returns the earlier of the two matching times.
Since 1.0.x
Availability net35-Client
Declaration
public static readonly AmbiguousTimeResolver ReturnEarlier
Field Value
Type | Description |
---|---|
AmbiguousTimeResolver |
ReturnEndOfIntervalBefore
SkippedTimeResolver which returns the final tick of the time zone interval
before the "gap".
Since 1.0.x
Availability net35-Client
Declaration
public static readonly SkippedTimeResolver ReturnEndOfIntervalBefore
Field Value
Type | Description |
---|---|
SkippedTimeResolver |
ReturnLater
AmbiguousTimeResolver which returns the later of the two matching times.
Since 1.0.x
Availability net35-Client
Declaration
public static readonly AmbiguousTimeResolver ReturnLater
Field Value
Type | Description |
---|---|
AmbiguousTimeResolver |
ReturnStartOfIntervalAfter
SkippedTimeResolver which returns the first tick of the time zone interval
after the "gap".
Since 1.0.x
Availability net35-Client
Declaration
public static readonly SkippedTimeResolver ReturnStartOfIntervalAfter
Field Value
Type | Description |
---|---|
SkippedTimeResolver |
StrictResolver
ZoneLocalMappingResolver which only ever succeeds in the (usual) case where the result
of the mapping is unambiguous. Otherwise, it throws SkippedTimeException or
AmbiguousTimeException. This resolver combines ThrowWhenAmbiguous and
ThrowWhenSkipped.
Since 1.0.x
Availability net35-Client
Declaration
public static readonly ZoneLocalMappingResolver StrictResolver
Field Value
Type | Description |
---|---|
ZoneLocalMappingResolver |
ThrowWhenAmbiguous
AmbiguousTimeResolver which simply throws an AmbiguousTimeException.
Since 1.0.x
Availability net35-Client
Declaration
public static readonly AmbiguousTimeResolver ThrowWhenAmbiguous
Field Value
Type | Description |
---|---|
AmbiguousTimeResolver |
ThrowWhenSkipped
SkippedTimeResolver which simply throws a SkippedTimeException (assuming
the arguments are all non-null).
Since 1.0.x
Availability net35-Client
Declaration
public static readonly SkippedTimeResolver ThrowWhenSkipped
Field Value
Type | Description |
---|---|
SkippedTimeResolver |
Methods
CreateMappingResolver(AmbiguousTimeResolver, SkippedTimeResolver)
Combines an AmbiguousTimeResolver and a SkippedTimeResolver into a ZoneLocalMappingResolver
in the obvious way: unambiguous mappings are returned directly, ambiguous mappings are delegated to the given
AmbiguousTimeResolver, and "skipped" mappings are delegated to the given SkippedTimeResolver.
Since 1.0.x
Availability net35-Client
Declaration
public static ZoneLocalMappingResolver CreateMappingResolver(AmbiguousTimeResolver ambiguousTimeResolver, SkippedTimeResolver skippedTimeResolver)
Parameters
Type | Name | Description |
---|---|---|
AmbiguousTimeResolver | ambiguousTimeResolver | Resolver to use for ambiguous mappings. |
SkippedTimeResolver | skippedTimeResolver | Resolver to use for "skipped" mappings. |
Returns
Type | Description |
---|---|
ZoneLocalMappingResolver | The logical combination of the two resolvers. |