销售电话: 1-800-867-1380
EN
此内容没有您的语言版本,但有英语版本。

CloudBlobClient.GetContainerReference Method

Updated: April 24, 2011

[This topic is part of the Microsoft Azure Storage Client Library 1.7, which has been deprecated. See Storage Client Library for the latest version.]

Returns a reference to a CloudBlobContainer object with the specified address.

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

用法
Dim instance As CloudBlobClient
Dim containerAddress As String
Dim returnValue As CloudBlobContainer

returnValue = instance.GetContainerReference(containerAddress)

public CloudBlobContainer GetContainerReference (
	string containerAddress
)

Parameters

containerAddress

Type: System.String

The name of the container, or an absolute URI to the container.

Return Value

Type: Microsoft.WindowsAzure.StorageClient.CloudBlobContainer

A reference to a container.

The GetContainerReference method returns a reference to the named container, but it does not indicate whether the container exists, as it does not make a round-trip to the service. If you need to ascertain the existence of the container, call a method such as FetchAttributes, and handle the resulting StorageClientException in the event the blob does not exist. The FetchAttributes method executes a HEAD request to populate the properties and metadata of the blob and as such is a lightweight option for determining whether the blob exists.

noteNote
When you specify a container name in the parameter, you must be aware of the character limitations related to container names. For more information, see Naming and Referencing Containers, Blobs, and Metadata.


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, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

 

本文是否对您有所帮助?
(1500 个剩余字符)
感谢您的反馈
Microsoft 正在进行一项网上调查,以了解您对 MSDN 网站的意见。 如果您选择参加,我们将会在您离开 MSDN 网站时向您显示该网上调查。

是否要参加?
显示:
© 2014 Microsoft