AzureTzInfoFileReader Constructor

Implements ITzInfoFileReader to retrieve tzinfo files from Microsoft Azure Blob storage

Definition

Namespace: InnerDrive.Azure
Assembly: InnerDrive.Azure (in InnerDrive.Azure.dll) Version: 5.3.9666.0
C#
public AzureTzInfoFileReader(
	IConfiguration configuration,
	ISecretProvider? secretProvider = null
)

Parameters

configuration  IConfiguration
The configuration information to use
secretProvider  ISecretProvider  (Optional)
The secret-enabled configuration provider to use

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:

{ "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