/// <summary> /// Initializes a new instance of the <see cref="DocumentRepository"/> class. /// </summary> public DocumentRepository(IStorageAccountWrapper storageAccountWrapper) { Args.IsNotNull(() => storageAccountWrapper); cloudBlobClient = storageAccountWrapper.CreateCloudBlobClient(); cloudBlobClient.DefaultRequestOptions.RetryPolicy = new ExponentialRetry(TimeSpan.FromSeconds(45), 5); }
/// <summary> /// Initializes a new instance of the <see cref="MetadataRepository{TEntity, TPartitionKey, TRowKey}" /> class. /// </summary> /// <param name="cloudStorageAccount">The cloud storage account.</param> public MetadataRepository(IStorageAccountWrapper storageAccountWrapper) { Args.IsNotNull(() => storageAccountWrapper); cloudTableClient = storageAccountWrapper.CreateCloudTableClient(); cloudTableClient.DefaultRequestOptions.RetryPolicy = new ExponentialRetry(TimeSpan.FromSeconds(45), 5); var cloudTableName = typeof(TEntity).Name.Replace("Entity", String.Empty); tableSet = new TableSet <TEntity>(cloudTableClient, cloudTableName); }