LocalCldrFileReader Class

Reads CLDR data files from a local disk file

Definition

Namespace: InnerDrive.TimeZones.Cldr
Assembly: InnerDrive.TimeZones (in InnerDrive.TimeZones.dll) Version: 5.3.9728.0
C#
public class LocalCldrFileReader : ICldrFileReader
Inheritance
Object    LocalCldrFileReader
Implements
ICldrFileReader

Remarks

This class uses two configuration keys: { "timeZoneSettings": { "cldrFolder": "the location on the local computer or network share where the files are kept", "cldrLocales": "a comma-delimited list of locale folder names to load, e.g. en,es,fr-CA" } }

Each locale is staged as a subfolder of cldrFolder containing a timeZoneNames.json file (e.g. {cldrFolder}/fr-CA/timeZoneNames.json); metaZones.json is staged directly in cldrFolder. A locale listed in cldrLocales whose file is not staged is skipped with a Trace message rather than failing the whole load.

Constructors

LocalCldrFileReader Creates a new instance of LocalCldrFileReader

Properties

FileName Gets the name of the file currently being read
Initialized If true, the reader is initialized, and there is no need to call the LoadAsync(CancellationToken) method
LocaleContents Returns the raw contents of each staged locale's timeZoneNames.json file that the class has read, keyed by locale (e.g. "fr-CA")
MetaZonesContent Returns the raw contents of the metaZones.json file that the class has read

Methods

Clear Clears the contents of the class
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
LoadAsync Parses the data from the input provided
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Fields

CldrFolderSettingKey Gets the name of the setting in the app.config or web.config file containing the name of the folder containing the staged CLDR data files.
CldrLocalesSettingKey Gets the name of the setting in the app.config or web.config file containing the comma-delimited list of locale folder names to load from CldrFolderSettingKey.

See Also