Class FakeDateTimeZoneSource
A time zone source for test purposes.
Create instances via FakeDateTimeZoneSource.Builder.
Since 1.1.x
Availability net45, netstandard1.3
Implements
Inherited Members
Namespace: NodaTime.Testing.TimeZones
Assembly: NodaTime.Testing.dll
Syntax
public sealed class FakeDateTimeZoneSource : IDateTimeZoneSource
Properties
VersionId
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public string VersionId { get; }
Property Value
Type | Description |
---|---|
String |
Methods
ForId(String)
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public DateTimeZone ForId(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id |
Returns
Type | Description |
---|---|
DateTimeZone |
GetIds()
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public IEnumerable<string> GetIds()
Returns
Type | Description |
---|---|
IEnumerable<String> |
GetSystemDefaultId()
Returns this source's ID for the system default time zone.
Since 2.0.x
Availability net45, netstandard1.3
Declaration
public string GetSystemDefaultId()
Returns
Type | Description |
---|---|
String | The ID for the system default time zone for this source, or null if the system default time zone has no mapping in this source. |
ToProvider()
Creates a time zone provider (DateTimeZoneCache) from this source.
Since 1.1.x
Availability net45, netstandard1.3
Declaration
public IDateTimeZoneProvider ToProvider()
Returns
Type | Description |
---|---|
IDateTimeZoneProvider | A provider backed by this source. |