public async ValueTask InitializeAsync(StorageClientContext context) { if (0 == Interlocked.CompareExchange(ref this.IsInitialized, 1, 0)) { await this.StorageClient.InitializeAsync(context); } }
private async Task <IStorageClient> GetStorageClientAsync(string qualifiedName, string name) { var wrapperService = this.ServiceProvider.GetServices <StorageClientWrapper>().FirstOrDefault(wrapper => 0 == string.Compare(qualifiedName, wrapper.Name, StringComparison.OrdinalIgnoreCase)); if (null == wrapperService) { return(null); } StorageClientContext context = new StorageClientContext(this.ServiceProvider, qualifiedName, name); await wrapperService.InitializeAsync(context); return(wrapperService.StorageClient); }
public ValueTask InitializeAsync(StorageClientContext context) { return(new ValueTask()); }