public async Task <IAsyncQueue <T> > CreateAsyncQueueAsync <T>(string queueName) where T : class { string connectionString = await _connectionStringProvider.GetAsync <IAsyncQueue <T> >(queueName); IAsyncQueue <T> result = new AsyncQueue <T>(_queueSerializer, connectionString, queueName, _loggerFactory.CreateLogger <AsyncQueue <T> >()); if (_azureSettings.CreateIfNotExists) { await result.GetCloudQueue().CreateIfNotExistsAsync(); } return(result); }
public async Task <IAsyncBlockBlobRepository> CreateAsyncBlockBlobRepositoryAsync(string containerName) { IAsyncBlockBlobRepository result = new AsyncBlockBlobRepository(await _connectionStringProvider.GetAsync <IAsyncBlockBlobRepository>(containerName), containerName, _loggerFactory); if (_azureSettings.CreateIfNotExists) { await result.GetContainer().CreateIfNotExistsAsync(); } return(result); }
public async Task <IAsyncTableStorageRepository <T> > CreateAsync <T>(string tableName) where T : ITableEntity, new() { if (String.IsNullOrWhiteSpace(tableName)) { throw new ArgumentNullException(nameof(tableName)); } string connectionString = await _connectionStringProvider.GetAsync <IAsyncTableStorageRepository <T> >(tableName); IAsyncTableStorageRepository <T> result = new AsyncTableStorageRepository <T>(connectionString, tableName, _tableStorageQueryBuilder, _tableContinuationTokenSerializer, _loggerFactory.CreateLogger <AsyncTableStorageRepository <T> >()); if (_azureSettings.CreateIfNotExists) { await result.GetCloudTable().CreateIfNotExistsAsync(); } return(result); }