private async Task InitializeAsync() { this.blobServiceConfig = await jsonConfigService.GetSettings(); if (this.blobServiceConfig == null) { this.blobServiceConfig = new BlobServiceConfig() { UseDevelopmentStorage = true }; await jsonConfigService.SaveSetting(this.blobServiceConfig); } CloudStorageAccount account = CloudStorageAccount.Parse(this.blobServiceConfig.GetConnectionString()); blobClient = account.CreateCloudBlobClient(); }
public BlobService(BlobServiceConfig blobServiceConfig, IJsonConfigService <BlobServiceConfig> jsonConfigService) { this.blobServiceConfig = blobServiceConfig; this.jsonConfigService = jsonConfigService; Initialization = InitializeAsync(); }