AzureTzInfoFileReader Class

Implements ITzInfoFileReader to retrieve tzinfo files from Microsoft Azure Blob storage

Definition

Namespace: InnerDrive.Azure
Assembly: InnerDrive.Azure (in InnerDrive.Azure.dll) Version: 5.2.9017.0
C#
public class AzureTzInfoFileReader : ITzInfoFileReader
Inheritance
Object    AzureTzInfoFileReader
Implements
ITzInfoFileReader

Remarks

The AzureTzInfoFileReader expects two configuration settings:
KeyDescription
storageConnectionStringThe Azure storage connection string to use
timeZoneSettings:timeZoneBlobNameThe Blob containing tzinfo database files

Here is a typical configuration section in appSettings.json, including settings used in the TimeZoneFactory:

C#
{
  "storageConnectionString": "Super secret Azure storage connection string",
    "timeZoneSettings": {
    "defaultTimeZoneHomeZone": "America/Chicago",
    "throwOnLoadFailure": "false",
    "timeZoneBlobName": "TimeZoneData"
  }
}

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

AzureTzInfoFileReader Implements ITzInfoFileReader to retrieve tzinfo files from Microsoft Azure Blob storage

Properties

FileContents Returns the contents of the tzinfo file that the class has read
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 method

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 containing the IANA time zone database files
StorageSettingKey Gets the name of the configuration item pointing to the Azure storage connection string to use

See Also