Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.