내보내기(0) 인쇄
모두 확장

CloudBlockBlob.DownloadBlockList 메서드 ()

Returns an enumerable collection of the committed blocks comprising the blob.

네임스페이스: Microsoft.WindowsAzure.StorageClient
어셈블리: Microsoft.WindowsAzure.StorageClient(microsoft.windowsazure.storageclient.dll)

‘사용 방법
Dim instance As CloudBlockBlob
Dim returnValue As IEnumerable(Of ListBlockItem)

returnValue = instance.DownloadBlockList

public IEnumerable<ListBlockItem> DownloadBlockList ()
public IEnumerable<ListBlockItem> DownloadBlockList ()
public function DownloadBlockList () : IEnumerable<ListBlockItem>

반환 값

An enumerable collection of objects implementing ListBlockItem.

The following code example downloads the block list for a blob and enumerates the blocks in the list. The example first downloads the committed blocks, then the uncommitted blocks, then the entire block list.

static void DownloadBlockListForBlob(Uri blobEndpoint, string accountName, string accountKey)
{
    //Create service client for credentialed access to the Blob service, using development storage.
    CloudBlobClient blobClient = new CloudBlobClient(blobEndpoint, new StorageCredentialsAccountAndKey(accountName, accountKey)); 

    //Get a reference to a block blob.
    CloudBlockBlob blockBlob = blobClient.GetBlockBlobReference("mycontainer/mybinaryblob.mp3");

    //Download the committed blocks in the block list.
    foreach (var blockListItem in blockBlob.DownloadBlockList())
    {
        Console.WriteLine("Block ID: " + blockListItem.Name);
        Console.WriteLine("Block size: " + blockListItem.Size);
        Console.WriteLine("Is block committed?: " + blockListItem.Committed);
        Console.WriteLine();
    }

    //Download only uncommitted blocks.
    foreach (var blockListItem in blockBlob.DownloadBlockList(BlockListingFilter.Uncommitted))
    {
        Console.WriteLine("Block ID: " + blockListItem.Name);
        Console.WriteLine("Block size: " + blockListItem.Size);
        Console.WriteLine("Is block committed?: " + blockListItem.Committed);
        Console.WriteLine();
    }

    //Download all blocks.
    foreach (var blockListItem in blockBlob.DownloadBlockList(BlockListingFilter.All))
    {
        Console.WriteLine("Block ID: " + blockListItem.Name);
        Console.WriteLine("Block size: " + blockListItem.Size);
        Console.WriteLine("Is block committed?: " + blockListItem.Committed);
        Console.WriteLine();
    }
}

The DownloadBlockList method downloads the list of committed blocks that comprise the blob. The committed block list includes the list of blocks that have been successfully committed to a blob.

The list of committed blocks is returned in the same order that they were committed to the blob. No block may appear more than once in the committed block list.


이 형식의 모든 public static(Shared, Visual Basic의 경우) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

개발 플랫폼

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008 및 Windows 2000

대상 플랫폼

커뮤니티 추가 항목

Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
표시:
© 2014 Microsoft