SALES: 1-800-867-1380
0 out of 1 rated this helpful - Rate this topic

CloudBlobContainer.GetBlockBlobReference Method

Updated: April 24, 2013

[This topic is part of the Windows Azure Storage Client Library 1.7, which has been deprecated. The current recommended version is Storage Client Library 3.0.]

Gets a reference to a block blob in this container.

Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)
'Usage

public CloudBlockBlob GetBlockBlobReference (
	string blobAddressUri
)

Parameters

blobAddressUri

Type: System.String

The URI of the blob relative to the container.

Return Value

Type: Microsoft.WindowsAzure.StorageClient.CloudBlockBlob

A reference to a block blob.

The blobAddressUri parameter is the URI of the block blob relative to the container. For example, consider the following code sample:

public CloudBlockBlob GetCloudBlockBlob(string storageAccountName, string key)
{
    // Create a reference to the storage account.
    StorageCredentialsAccountAndKey storageCredentials = new StorageCredentialsAccountAndKey(storageAccountName, key);
    CloudStorageAccount storageAccount = new CloudStorageAccount(storageCredentials, false);

    // Create a reference to a blob container and a block blob within the container.
    CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
    CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
    CloudBlockBlob myBlob = container.GetBlockBlobReference("myblob");

    return myBlob;
}


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.