匯出 (0) 列印
全部展開

CloudPageBlob.GetPageRanges 方法 (BlobRequestOptions)

Gets a collection of page ranges and their starting and ending bytes.

命名空間: Microsoft.WindowsAzure.StorageClient
組件: Microsoft.WindowsAzure.StorageClient (在 microsoft.windowsazure.storageclient.dll 中)

'用途
Dim instance As CloudPageBlob
Dim options As BlobRequestOptions
Dim returnValue As IEnumerable(Of PageRange)

returnValue = instance.GetPageRanges(options)

public IEnumerable<PageRange> GetPageRanges (
	BlobRequestOptions options
)
public IEnumerable<PageRange> GetPageRanges (
	BlobRequestOptions options
)
public function GetPageRanges (
	options : BlobRequestOptions
) : IEnumerable<PageRange>

參數

options

An object that specifies any additional options for the request.

傳回值

An enumerable collection of page ranges.

The following example returns the collection of page ranges for a page blob and writes them to the console window.

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

    //Get a reference to the page blob.
    CloudPageBlob pageBlob = blobClient.GetPageBlobReference("mycontainer/mypageblob");

    foreach (PageRange pageRange in pageBlob.GetPageRanges())
    {
        Console.WriteLine("Starting offset: " + pageRange.StartOffset);
        Console.WriteLine("Ending offset: " + pageRange.EndOffset);
        Console.WriteLine("Content: " + pageRange.ToString());
        Console.WriteLine();
    }
}

The start and end byte offsets for each page range are inclusive.


任何這個類型的公用靜態 (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。 並非所有的執行個體成員都是安全執行緒。

開發平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003、Windows Server 2008 和 Windows 2000

目標平台

社群新增項目

顯示:
© 2014 Microsoft