public AsynchronousBlockBlobRepository(
string storageAccountConnectionString,
string containerName,
IAzureAssemblyLogger logger)
{
_logger = logger;
if (IsNullOrWhiteSpace(containerName)) throw new ArgumentNullException(nameof(containerName));
if (IsNullOrWhiteSpace(storageAccountConnectionString)) throw new ArgumentNullException(nameof(storageAccountConnectionString));
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(storageAccountConnectionString);
CloudBlobClient client = storageAccount.CreateCloudBlobClient();
client.DefaultRequestOptions.RetryPolicy = new ExponentialRetry(TimeSpan.FromSeconds(120), 3);
_container = client.GetContainerReference(containerName);
// Development storage doesn't return a '/' on the end, live storage does.
_endpoint = !client.BaseUri.ToString().EndsWith("/") ? $"{client.BaseUri}/{containerName}" : $"{client.BaseUri}{containerName}";
_logger?.Verbose("AsynchronousBlockBlobRepository: create repository for endpoint {0}", _endpoint);
}