Skip to content

Instantly share code, notes, and snippets.

@akki-s
Created October 31, 2018 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akki-s/923728e1332cf510d13f53d8ad12ac74 to your computer and use it in GitHub Desktop.
Save akki-s/923728e1332cf510d13f53d8ad12ac74 to your computer and use it in GitHub Desktop.
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