を使用しています。私はMicrosoft.Azure.Storage.DataMovement SDKバージョン0.5.0と0.6.0でテストします。以下は私がテストに使用したコードです。
string storageConnectionString = "connection string";
CloudStorageAccount account = CloudStorageAccount.Parse(storageConnectionString);
CloudBlobClient blobClient = account.CreateCloudBlobClient();
CloudBlobContainer blobContainer = blobClient.GetContainerReference("container name");
blobContainer.CreateIfNotExists();
string destPath = "file path";
CloudBlockBlob sourceBlob = blobContainer.GetBlockBlobReference("blob name");
TransferManager.Configurations.ParallelOperations = 64;
// Setup the transfer context and track the download progress
SingleTransferContext context = new SingleTransferContext
{
ProgressHandler = new Progress<TransferStatus>(progress =>
{
Console.WriteLine("Bytes download: {0}", progress.BytesTransferred);
})
};
// download thee blob
var task = TransferManager.DownloadAsync(
sourceBlob, destPath, null, context, CancellationToken.None);
task.Wait();