Created
October 31, 2018 03:18
-
-
Save akki-s/923728e1332cf510d13f53d8ad12ac74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TimeZoneService : ITimeZoneService | |
{ | |
private const string ContainerName = "azfnv2demo"; | |
private const string FileName = "timezones.json"; | |
private readonly IAzureBlobStorageHelper _azureBlobStorageHelper; | |
public TimeZoneService(IAzureBlobStorageHelper azureBlobStorageHelper) | |
{ | |
_azureBlobStorageHelper = azureBlobStorageHelper;; | |
} | |
public async Task<IEnumerable<string>> GetTimeZones() | |
{ | |
var jsonContent = await _azureBlobStorageHelper.DownloadBlobContent(ContainerName, FileName).ConfigureAwait(false); | |
return string.IsNullOrEmpty(jsonContent) ? null : JsonConvert.DeserializeObject<IEnumerable<string>>(jsonContent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment