Class FakeDateTimeZoneSource
A time zone source for test purposes.
Create instances via FakeDateTimeZoneSource.Builder.
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Inheritance
Object
FakeDateTimeZoneSource
Implements
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime.Testing.TimeZones
Assembly: NodaTime.Testing.dll
Syntax
public sealed class FakeDateTimeZoneSource : IDateTimeZoneSource
Properties
VersionId
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
Declaration
public string VersionId { get; }
Property Value
Type | Description |
---|---|
String |
Methods
ForId(String)
Since 1.1.x
Availability net45, netstandard1.3, netstandard2.0
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, netstandard2.0
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, netstandard2.0
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, netstandard2.0
Declaration
public IDateTimeZoneProvider ToProvider()
Returns
Type | Description |
---|---|
IDateTimeZoneProvider | A provider backed by this source. |