public async Task <bool> CreateStorageIfNotExists() { var tasks = new List <Task <bool> >() { ApiResourceTable.CreateIfNotExistsAsync(), ApiResourceBlobContainer.CreateIfNotExistsAsync(), IdentityResourceBlobContainer.CreateIfNotExistsAsync() }; await Task.WhenAll(tasks); return(tasks.Select(t => t.Result).All(a => a)); }
public async Task <bool> CreateStorageIfNotExists() { var tasks = new List <Task>() { ApiResourceTable.CreateIfNotExistsAsync(), ApiResourceBlobContainer.CreateIfNotExistsAsync(), IdentityResourceBlobContainer.CreateIfNotExistsAsync(), ApiResourceBlobCacheContainer.CreateIfNotExistsAsync(), IdentityResourceBlobCacheContainer.CreateIfNotExistsAsync() }; await Task.WhenAll(tasks).ConfigureAwait(false); return(tasks.Select(t => t.IsCompleted).All(a => a)); }