Eksportuj (0) Drukuj
Rozwiń wszystko
EN
Ta zawartość nie jest dostępna w wymaganym języku. Wersja w języku angielskim znajduje się tutaj.
0 z 2 osób oceniło jako pomocne - Oceń ten temat

CloudBlobContainer.GetBlobReferenceFromServer Method

Updated: September 24, 2013

[This topic is part of the Windows Azure Storage Client Library 2.1. The current recommended version is Storage Client Library 3.0.]

Gets a reference to a blob in this container.

Namespace: Microsoft.WindowsAzure.Storage.Blob
Assembly: Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)
'Użycie
Dim instance As CloudBlobContainer
Dim blobName As String
Dim accessCondition As AccessCondition
Dim options As BlobRequestOptions
Dim operationContext As OperationContext
Dim returnValue As ICloudBlob

returnValue = instance.GetBlobReferenceFromServer(blobName, accessCondition, options, operationContext)
[DoesServiceRequest] 
public ICloudBlob GetBlobReferenceFromServer (
	string blobName,
	[OptionalAttribute] AccessCondition accessCondition,
	[OptionalAttribute] BlobRequestOptions options,
	[OptionalAttribute] OperationContext operationContext
)

Parameters

blobName

The name of the blob.

accessCondition

An AccessCondition object that represents the access conditions for the container. If null, no condition is used.

options

A BlobRequestOptions object that specifies any additional options for the request.

operationContext

An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Return Value

A reference to the blob.

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

static public ICloudBlob GetCloudBlob(Uri blobEndpoint, string accountName, string accountKey)
{
    // Create service client for credentialed access to the Blob service.
    CloudBlobClient blobClient =
        new CloudBlobClient(blobEndpoint, new StorageCredentials(accountName, accountKey));

    // Create a reference to a blob container and a blob within the container.
    CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
    ICloudBlob myBlob = container.GetBlobReferenceFromServer("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

 

Czy oceniasz te materiały jako pomocne?
(Pozostało znaków: 1500)
Dziękujemy za opinię.
Pokaż:
© 2014 Microsoft. Wszelkie prawa zastrzeżone.