C# Класс Microsoft.WindowsAzure.StorageClient.CloudBlobClient

Provides a client for accessing the Windows Azure Blob service.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CloudBlobClient System
ConvertDateTimeToSnapshotString string
EndGetResponse System.Net.WebResponse
EndListBlobsWithPrefixSegmented ResultSegment
EndListContainersSegmented ResultSegment
GetBlockBlob CloudBlockBlob
GetPageBlob Microsoft.WindowsAzure.StorageClient.CloudPageBlob
GetResponse System.Net.WebResponse
GetServicePropertiesImpl System.Collections.Generic.IEnumerable
ListBlobImpl System.Collections.Generic.IEnumerable
ListContainersImpl System.Collections.Generic.IEnumerable
ListContainersImplCore System.Collections.Generic.IEnumerable
ParseUserPrefix void
SelectProtocolResponse IListBlobItem
SetServicePropertiesImpl System.Collections.Generic.IEnumerable

Открытые методы

Метод Описание
BeginGetServiceProperties ( AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous operation to get the properties of the blob service.

BeginListBlobsWithPrefixSegmented ( string prefix, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous operation to return a result segment containing a collection of blob items whose names begin with the specified prefix.

BeginListBlobsWithPrefixSegmented ( string prefix, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous operation to return a result segment containing a collection of blob items whose names begin with the specified prefix.

BeginListContainersSegmented ( AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous request to return a result segment containing a collection of containers.

BeginListContainersSegmented ( string prefix, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous request to return a result segment containing a collection of containers whose names begin with the specified prefix.

BeginListContainersSegmented ( string prefix, ContainerListingDetails detailsIncluded, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous request to return a result segment containing a collection of containers whose names begin with the specified prefix.

BeginListContainersSegmented ( string prefix, ContainerListingDetails detailsIncluded, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous request to return a result segment containing a collection of containers whose names begin with the specified prefix.

BeginSetServiceProperties ( Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties properties, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous operation to set the properties of the blob service.

CloudBlobClient ( Uri baseUri, StorageCredentials credentials ) : System

Initializes a new instance of the CloudBlobClient class using the specified Blob service endpoint and account credentials.

CloudBlobClient ( string baseAddress ) : System

Initializes a new instance of the CloudBlobClient class to be used for anonymous access.

CloudBlobClient ( string baseAddress, StorageCredentials credentials ) : System

Initializes a new instance of the CloudBlobClient class using the specified Blob service endpoint and account credentials.

EndGetServiceProperties ( IAsyncResult asyncResult ) : Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties

Ends an asynchronous operation to get the properties of the blob service.

EndSetServiceProperties ( IAsyncResult asyncResult ) : void

Ends an asynchronous operation to set the properties of the blob service.

GetBlobDirectoryReference ( string blobDirectoryAddress ) : Microsoft.WindowsAzure.StorageClient.CloudBlobDirectory

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

GetBlobReference ( string blobAddress ) : CloudBlob

Returns a reference to a CloudBlob with the specified address.

GetBlobReference ( string blobAddress, System.DateTime snapshotTime ) : CloudBlob

Returns a reference to a blob with the specified address.

GetBlockBlobReference ( string blobAddress ) : CloudBlockBlob

Returns a reference to a CloudBlockBlob with the specified address.

GetBlockBlobReference ( string blobAddress, System.DateTime snapshotTime ) : CloudBlockBlob

Returns a reference to a CloudBlockBlob with the specified address.

GetContainerReference ( string containerAddress ) : CloudBlobContainer

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

GetPageBlobReference ( string blobAddress ) : Microsoft.WindowsAzure.StorageClient.CloudPageBlob

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

GetPageBlobReference ( string blobAddress, System.DateTime snapshotTime ) : Microsoft.WindowsAzure.StorageClient.CloudPageBlob

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

GetServiceProperties ( ) : Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties

Gets the properties of the blob service.

ListBlobsWithPrefix ( string prefix ) : IEnumerable

Returns an enumerable collection of blob items whose names begin with the specified prefix.

ListBlobsWithPrefix ( string prefix, BlobRequestOptions options ) : IEnumerable

Returns an enumerable collection of blob items whose names begin with the specified prefix and that are retrieved lazily.

ListBlobsWithPrefixSegmented ( string prefix ) : ResultSegment

Returns a result segment containing a collection of blob items whose names begin with the specified prefix.

ListBlobsWithPrefixSegmented ( string prefix, BlobRequestOptions options ) : ResultSegment

Returns a result segment containing a collection of blob items whose names begin with the specified prefix.

ListBlobsWithPrefixSegmented ( string prefix, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken ) : ResultSegment

Returns a result segment containing a collection of blob items whose names begin with the specified prefix.

ListBlobsWithPrefixSegmented ( string prefix, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, BlobRequestOptions options ) : ResultSegment

Returns a result segment containing a collection of blob items whose names begin with the specified prefix.

ListContainers ( ) : IEnumerable

Returns an enumerable collection of containers.

ListContainers ( string prefix ) : IEnumerable

Returns an enumerable collection of containers whose names begin with the specified prefix.

ListContainers ( string prefix, ContainerListingDetails detailsIncluded ) : IEnumerable

Returns an enumerable collection of containers whose names begin with the specified prefix and that are retrieved lazily.

ListContainersSegmented ( ) : ResultSegment

Returns a result segment containing a collection of containers.

ListContainersSegmented ( string prefix ) : ResultSegment

Returns a result segment containing a collection of containers whose names begin with the specified prefix.

ListContainersSegmented ( string prefix, ContainerListingDetails detailsIncluded, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken ) : ResultSegment

Returns a result segment containing a collection of containers whose names begin with the specified prefix.

SetServiceProperties ( Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties properties ) : void

Sets the properties of the blob service.

Приватные методы

Метод Описание
CloudBlobClient ( bool usePathStyleUris, Uri baseUri, StorageCredentials credentials ) : System

Initializes a new instance of the CloudBlobClient class.

ConvertDateTimeToSnapshotString ( System.DateTime snapshot ) : string

Converts the date time to snapshot string.

EndGetResponse ( IAsyncResult asyncresult, WebRequest req ) : WebResponse

Ends the asynchronous GetResponse operation.

EndListBlobsWithPrefixSegmented ( IAsyncResult asyncResult ) : ResultSegment
EndListContainersSegmented ( IAsyncResult asyncResult ) : ResultSegment
GetBlockBlob ( string blobAddress ) : CloudBlockBlob
GetPageBlob ( string blobAddress ) : Microsoft.WindowsAzure.StorageClient.CloudPageBlob
GetResponse ( WebRequest req ) : WebResponse

Gets the response for the operation.

GetServicePropertiesImpl ( Action setResult ) : System.Collections.Generic.IEnumerable

Generates a task sequence for getting the properties of the blob service.

ListBlobImpl ( string prefix, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, int maxResults, BlobRequestOptions options, Action setResult ) : System.Collections.Generic.IEnumerable

Implementation for the ListBlobs method.

ListContainersImpl ( string prefix, ContainerListingDetails detailsIncluded, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, int maxResults, Action setResult ) : System.Collections.Generic.IEnumerable

Implementation for the ListContainers method.

ListContainersImplCore ( string prefix, ContainerListingDetails detailsIncluded, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, Microsoft.WindowsAzure.StorageClient.ResultPagination pagination, Action setResult ) : System.Collections.Generic.IEnumerable

Core implementation for the ListContainers method.

ParseUserPrefix ( string prefix, string &containerName, string &listingPrefix ) : void

Parses the user prefix.

SelectProtocolResponse ( IListBlobEntry protocolItem, CloudBlobClient service, CloudBlobContainer container ) : IListBlobItem

Selects the protocol response.

SetServicePropertiesImpl ( Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties properties ) : System.Collections.Generic.IEnumerable

Generates a task sequence for setting the properties of the blob service.

Описание методов

BeginGetServiceProperties() публичный Метод

Begins an asynchronous operation to get the properties of the blob service.
public BeginGetServiceProperties ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback The callback delegate that will receive notification when the asynchronous operation completes.
state object A user defined object to be passed to the callback delegate.
Результат IAsyncResult

BeginListBlobsWithPrefixSegmented() публичный Метод

Begins an asynchronous operation to return a result segment containing a collection of blob items whose names begin with the specified prefix.
public BeginListBlobsWithPrefixSegmented ( string prefix, AsyncCallback callback, object state ) : IAsyncResult
prefix string The blob name prefix. This value must be preceded either by the name of the container or by the absolute path to the container.
callback AsyncCallback The callback delegate that will receive notification when the asynchronous operation completes.
state object A user-defined object that will be passed to the callback delegate.
Результат IAsyncResult

BeginListBlobsWithPrefixSegmented() публичный Метод

Begins an asynchronous operation to return a result segment containing a collection of blob items whose names begin with the specified prefix.
public BeginListBlobsWithPrefixSegmented ( string prefix, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, AsyncCallback callback, object state ) : IAsyncResult
prefix string The blob name prefix. This value must be preceded either by the name of the container or by the absolute path to the container.
maxResults int A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the /// per-operation limit of 5000. If this value is zero, the maximum possible number of results will be returned, up to 5000.
continuationToken Microsoft.WindowsAzure.StorageClient.ResultContinuation A continuation token returned by a previous listing operation.
callback AsyncCallback The callback delegate that will receive notification when the asynchronous operation completes.
state object A user-defined object that will be passed to the callback delegate.
Результат IAsyncResult

BeginListContainersSegmented() публичный Метод

Begins an asynchronous request to return a result segment containing a collection of containers.
public BeginListContainersSegmented ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback The callback delegate that will receive notification when the asynchronous operation completes.
state object A user-defined object that will be passed to the callback delegate.
Результат IAsyncResult

BeginListContainersSegmented() публичный Метод

Begins an asynchronous request to return a result segment containing a collection of containers whose names begin with the specified prefix.
public BeginListContainersSegmented ( string prefix, AsyncCallback callback, object state ) : IAsyncResult
prefix string The container name prefix.
callback AsyncCallback The callback delegate that will receive notification when the asynchronous operation completes.
state object A user-defined object that will be passed to the callback delegate.
Результат IAsyncResult

BeginListContainersSegmented() публичный Метод

Begins an asynchronous request to return a result segment containing a collection of containers whose names begin with the specified prefix.
public BeginListContainersSegmented ( string prefix, ContainerListingDetails detailsIncluded, AsyncCallback callback, object state ) : IAsyncResult
prefix string The container name prefix.
detailsIncluded ContainerListingDetails A value that indicates whether to return container metadata with the listing.
callback AsyncCallback The callback delegate that will receive notification when the asynchronous operation completes.
state object A user-defined object that will be passed to the callback delegate.
Результат IAsyncResult

BeginListContainersSegmented() публичный Метод

Begins an asynchronous request to return a result segment containing a collection of containers whose names begin with the specified prefix.
public BeginListContainersSegmented ( string prefix, ContainerListingDetails detailsIncluded, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, AsyncCallback callback, object state ) : IAsyncResult
prefix string The container name prefix.
detailsIncluded ContainerListingDetails A value that indicates whether to return container metadata with the listing.
maxResults int A non-negative integer value that indicates the maximum number of results to be returned /// in the result segment, up to the per-operation limit of 5000. If this value is zero, the maximum possible number of results will be returned, up to 5000.
continuationToken Microsoft.WindowsAzure.StorageClient.ResultContinuation A continuation token returned by a previous listing operation.
callback AsyncCallback The callback delegate that will receive notification when the asynchronous operation completes.
state object A user-defined object that will be passed to the callback delegate.
Результат IAsyncResult

BeginSetServiceProperties() публичный Метод

Begins an asynchronous operation to set the properties of the blob service.
public BeginSetServiceProperties ( Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties properties, AsyncCallback callback, object state ) : IAsyncResult
properties Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties The blob service properties.
callback AsyncCallback The callback delegate that will receive notification when the asynchronous operation completes.
state object A user defined object to be passed to the callback delegate.
Результат IAsyncResult

CloudBlobClient() публичный Метод

Initializes a new instance of the CloudBlobClient class using the specified Blob service endpoint and account credentials.
public CloudBlobClient ( Uri baseUri, StorageCredentials credentials ) : System
baseUri System.Uri The Blob service endpoint to use to create the client.
credentials StorageCredentials The account credentials.
Результат System

CloudBlobClient() публичный Метод

Initializes a new instance of the CloudBlobClient class to be used for anonymous access.
public CloudBlobClient ( string baseAddress ) : System
baseAddress string The Blob service endpoint to use to create the client.
Результат System

CloudBlobClient() публичный Метод

Initializes a new instance of the CloudBlobClient class using the specified Blob service endpoint and account credentials.
public CloudBlobClient ( string baseAddress, StorageCredentials credentials ) : System
baseAddress string The Blob service endpoint to use to create the client.
credentials StorageCredentials The account credentials.
Результат System

EndGetServiceProperties() публичный Метод

Ends an asynchronous operation to get the properties of the blob service.
public EndGetServiceProperties ( IAsyncResult asyncResult ) : Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties
asyncResult IAsyncResult The result returned from a prior call to .
Результат Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties

EndSetServiceProperties() публичный Метод

Ends an asynchronous operation to set the properties of the blob service.
public EndSetServiceProperties ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult The result returned from a prior call to .
Результат void

GetBlobDirectoryReference() публичный Метод

Returns a reference to a CloudBlobDirectory object with the specified address.
public GetBlobDirectoryReference ( string blobDirectoryAddress ) : Microsoft.WindowsAzure.StorageClient.CloudBlobDirectory
blobDirectoryAddress string The absolute URI to the virtual directory, /// or a relative URI beginning with the container name.
Результат Microsoft.WindowsAzure.StorageClient.CloudBlobDirectory

GetBlobReference() публичный Метод

Returns a reference to a CloudBlob with the specified address.
public GetBlobReference ( string blobAddress ) : CloudBlob
blobAddress string The absolute URI to the blob, or a relative URI beginning with the container name.
Результат CloudBlob

GetBlobReference() публичный Метод

Returns a reference to a blob with the specified address.
public GetBlobReference ( string blobAddress, System.DateTime snapshotTime ) : CloudBlob
blobAddress string The absolute URI to the blob, or a relative URI beginning with the container name.
snapshotTime System.DateTime The snapshot timestamp, if the blob is a snapshot.
Результат CloudBlob

GetBlockBlobReference() публичный Метод

Returns a reference to a CloudBlockBlob with the specified address.
public GetBlockBlobReference ( string blobAddress ) : CloudBlockBlob
blobAddress string The absolute URI to the blob, or a relative URI beginning with the container name.
Результат CloudBlockBlob

GetBlockBlobReference() публичный Метод

Returns a reference to a CloudBlockBlob with the specified address.
public GetBlockBlobReference ( string blobAddress, System.DateTime snapshotTime ) : CloudBlockBlob
blobAddress string The absolute URI to the blob, or a relative URI beginning with the container name.
snapshotTime System.DateTime The snapshot timestamp, if the blob is a snapshot.
Результат CloudBlockBlob

GetContainerReference() публичный Метод

Returns a reference to a CloudBlobContainer object with the specified address.
public GetContainerReference ( string containerAddress ) : CloudBlobContainer
containerAddress string The name of the container, or an absolute URI to the container.
Результат CloudBlobContainer

GetPageBlobReference() публичный Метод

Returns a reference to a CloudPageBlob object with the specified address.
public GetPageBlobReference ( string blobAddress ) : Microsoft.WindowsAzure.StorageClient.CloudPageBlob
blobAddress string The absolute URI to the blob, or a relative URI beginning with the container name.
Результат Microsoft.WindowsAzure.StorageClient.CloudPageBlob

GetPageBlobReference() публичный Метод

Returns a reference to a CloudPageBlob object with the specified address.
public GetPageBlobReference ( string blobAddress, System.DateTime snapshotTime ) : Microsoft.WindowsAzure.StorageClient.CloudPageBlob
blobAddress string The absolute URI to the blob, or a relative URI beginning with the container name.
snapshotTime System.DateTime The snapshot timestamp, if the blob is a snapshot.
Результат Microsoft.WindowsAzure.StorageClient.CloudPageBlob

GetServiceProperties() публичный Метод

Gets the properties of the blob service.
public GetServiceProperties ( ) : Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties
Результат Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties

ListBlobsWithPrefix() публичный Метод

Returns an enumerable collection of blob items whose names begin with the specified prefix.
public ListBlobsWithPrefix ( string prefix ) : IEnumerable
prefix string The blob name prefix. This value must be preceded either by the name of the container or by the absolute URI to the container.
Результат IEnumerable

ListBlobsWithPrefix() публичный Метод

Returns an enumerable collection of blob items whose names begin with the specified prefix and that are retrieved lazily.
public ListBlobsWithPrefix ( string prefix, BlobRequestOptions options ) : IEnumerable
prefix string The blob name prefix. This value must be preceded either by the name of the container or by the absolute URI to the container.
options BlobRequestOptions An object that specifies any additional options for the request.
Результат IEnumerable

ListBlobsWithPrefixSegmented() публичный Метод

Returns a result segment containing a collection of blob items whose names begin with the specified prefix.
public ListBlobsWithPrefixSegmented ( string prefix ) : ResultSegment
prefix string The blob name prefix. This value must be preceded either by the name of the container or by the absolute path to the container.
Результат ResultSegment

ListBlobsWithPrefixSegmented() публичный Метод

Returns a result segment containing a collection of blob items whose names begin with the specified prefix.
public ListBlobsWithPrefixSegmented ( string prefix, BlobRequestOptions options ) : ResultSegment
prefix string The blob name prefix. This value must be preceded either by the name of the container or by the absolute path to the container.
options BlobRequestOptions An object that specifies any additional options for the request.
Результат ResultSegment

ListBlobsWithPrefixSegmented() публичный Метод

Returns a result segment containing a collection of blob items whose names begin with the specified prefix.
public ListBlobsWithPrefixSegmented ( string prefix, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken ) : ResultSegment
prefix string The blob name prefix. This value must be preceded either by the name of the container or by the absolute path to the container.
maxResults int A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. /// If this value is zero, the maximum possible number of results will be returned, up to 5000.
continuationToken Microsoft.WindowsAzure.StorageClient.ResultContinuation A continuation token returned by a previous listing operation.
Результат ResultSegment

ListBlobsWithPrefixSegmented() публичный Метод

Returns a result segment containing a collection of blob items whose names begin with the specified prefix.
public ListBlobsWithPrefixSegmented ( string prefix, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken, BlobRequestOptions options ) : ResultSegment
prefix string The blob name prefix. This value must be preceded either by the name of the container or by the absolute path to the container.
maxResults int A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. /// If this value is zero, the maximum possible number of results will be returned, up to 5000.
continuationToken Microsoft.WindowsAzure.StorageClient.ResultContinuation A continuation token returned by a previous listing operation.
options BlobRequestOptions An object that specifies any additional options for the request.
Результат ResultSegment

ListContainers() публичный Метод

Returns an enumerable collection of containers.
public ListContainers ( ) : IEnumerable
Результат IEnumerable

ListContainers() публичный Метод

Returns an enumerable collection of containers whose names begin with the specified prefix.
public ListContainers ( string prefix ) : IEnumerable
prefix string The container name prefix.
Результат IEnumerable

ListContainers() публичный Метод

Returns an enumerable collection of containers whose names begin with the specified prefix and that are retrieved lazily.
public ListContainers ( string prefix, ContainerListingDetails detailsIncluded ) : IEnumerable
prefix string The container name prefix.
detailsIncluded ContainerListingDetails A value that indicates whether to return container metadata with the listing.
Результат IEnumerable

ListContainersSegmented() публичный Метод

Returns a result segment containing a collection of containers.
public ListContainersSegmented ( ) : ResultSegment
Результат ResultSegment

ListContainersSegmented() публичный Метод

Returns a result segment containing a collection of containers whose names begin with the specified prefix.
public ListContainersSegmented ( string prefix ) : ResultSegment
prefix string The container name prefix.
Результат ResultSegment

ListContainersSegmented() публичный Метод

Returns a result segment containing a collection of containers whose names begin with the specified prefix.
public ListContainersSegmented ( string prefix, ContainerListingDetails detailsIncluded, int maxResults, Microsoft.WindowsAzure.StorageClient.ResultContinuation continuationToken ) : ResultSegment
prefix string The container name prefix.
detailsIncluded ContainerListingDetails A value that indicates whether to return container metadata with the listing.
maxResults int A non-negative integer value that indicates the maximum number of results to be returned /// in the result segment, up to the per-operation limit of 5000. If this value is zero, the maximum possible number of results will be returned, up to 5000.
continuationToken Microsoft.WindowsAzure.StorageClient.ResultContinuation A continuation token returned by a previous listing operation.
Результат ResultSegment

SetServiceProperties() публичный Метод

Sets the properties of the blob service.
public SetServiceProperties ( Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties properties ) : void
properties Microsoft.WindowsAzure.StorageClient.Protocol.ServiceProperties The blob service properties.
Результат void