Click or drag to resize

AzureTzInfoFileReader Class

Implements ITzInfoFileReader to retrieve tzinfo files from Microsoft Azure Blob storage
Inheritance Hierarchy
SystemObject
  InnerDrive.AzureAzureTzInfoFileReader

Namespace: InnerDrive.Azure
Assembly: InnerDrive.Azure (in InnerDrive.Azure.dll) Version: 5.0.8475.0
Syntax
C#
public class AzureTzInfoFileReader : ITzInfoFileReader

The AzureTzInfoFileReader type exposes the following members.

Constructors
 NameDescription
Public methodAzureTzInfoFileReader Creates a new instance of AzureTzInfoFileReader
Top
Properties
 NameDescription
Public propertyFileContents Returns the contents of the tzinfo file that the class has read
Public propertyFileName Gets the name of the file currently being read
Public propertyInitialized If true, the reader is initialized, and there is no need to call the Load method
Top
Methods
 NameDescription
Public methodClear Clears the contents of the class
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodLoad Parses the data from the input provided
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Public fieldStatic memberBlobNameConfigKey Gets the name of the configuration item pointing to the blob containing the IANA time zone database files
Public fieldStatic memberStorageSettingKey Gets the name of the configuration item pointing to the Azure storage connection string to use
Top
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.

See Also