AzureCldrFileReader Class

Implements ICldrFileReader to retrieve CLDR files from Microsoft Azure Blob storage

Definition

Namespace: InnerDrive.Azure
Assembly: InnerDrive.Azure (in InnerDrive.Azure.dll) Version: 5.3.9728.0
C#
public class AzureCldrFileReader : ICldrFileReader
Inheritance
Object    AzureCldrFileReader
Implements
ICldrFileReader

Remarks

The AzureCldrFileReader expects two configuration settings:
KeyDescription
storageConnectionStringThe Azure storage connection string to use
timeZoneSettings:cldrBlobNameThe Blob container holding the staged CLDR data files

Blob names follow the same layout as LocalCldrFileReader: metaZones.json at the container root, and {locale}/timeZoneNames.json per staged locale (e.g. fr-CA/timeZoneNames.json); Azure Blob names may contain / to represent this virtual folder structure.

Here is a typical configuration section in appSettings.json:

{ "storageConnectionString": "Super secret Azure storage connection string", "timeZoneSettings": { "cldrBlobName": "CldrData" } }

Note that the storage connection string can be set up as a secret that the ISecretProvider instance can retrieve. For example, to store it in Microsoft Azure Key Vault, you can use the KeyVaultSecretProvider class.

Constructors

AzureCldrFileReader Implements ICldrFileReader to retrieve CLDR files from Microsoft Azure Blob storage

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

BlobNameConfigKey Gets the name of the configuration item pointing to the blob container holding the staged CLDR data files
StorageSettingKey Gets the name of the configuration item pointing to the Azure storage connection string to use

See Also