C# Class Azure.Storage.BlobStorageAsync

Simple helper class for Windows Azure storage blobs
Inheritance: IBlobStorageAsync
ファイルを表示 Open project: cmatskas/Azure.Storage

Public Methods

Method Description
AddDataToAppendBlockBlob ( string blobId, string data ) : Task

Adds data to the end of an Append blob. Should be used within a single writer as the code is not optimised for concurrent writers

BlobStorageAsync ( string blobContainerName, string storageConnectionString ) : System

Creates a new BlobStorage object

CreateBlockBlobAsync ( string blobId, string filePath ) : Task

Creates a new block blob and populates it from a file

CreateBlockBlobAsync ( string blobId, string contentType, Stream data ) : Task

Creates a new block blob and populates it from a stream

CreateBlockBlobAsync ( string blobId, string contentType, byte data ) : Task

Creates a new block blob and populates it from a byte array

CreateBlockBlobAsync ( string blobId, string contentType, string data ) : Task

Creates a new block blob and populates it from a string

DeleteBlobAsync ( string blobId ) : System.Threading.Tasks.Task

Deletes the block blob with the given unique blob name

DeleteBlobContainerAsync ( ) : System.Threading.Tasks.Task

Deletes the blob container

GetAppendBlockBlobReference ( string blobId ) : Microsoft.WindowsAzure.Storage.Blob.CloudAppendBlob
GetBlockBlobDataAsStreamAsync ( string blobId ) : Task

Returns as stream with the contents of a block blob with the given blob name

GetBlockBlobDataAsStringAsync ( string blobId ) : Task

Returns as string with the contents of a block blob with the given blob name

GetBlockBlobReference ( string blobId ) : Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob

Gets a reference to a block blob with the given unique blob name

ListBlobsInContainer ( string containerName ) : IEnumerable

Returns a list of all the blobs in a container

Method Details

AddDataToAppendBlockBlob() public method

Adds data to the end of an Append blob. Should be used within a single writer as the code is not optimised for concurrent writers
public AddDataToAppendBlockBlob ( string blobId, string data ) : Task
blobId string
data string
return Task

BlobStorageAsync() public method

Creates a new BlobStorage object
public BlobStorageAsync ( string blobContainerName, string storageConnectionString ) : System
blobContainerName string The name of the blob to be managed
storageConnectionString string The connection string pointing to the storage account (this can be local or hosted in Windows Azure
return System

CreateBlockBlobAsync() public method

Creates a new block blob and populates it from a file
public CreateBlockBlobAsync ( string blobId, string filePath ) : Task
blobId string The blobId for the block blob
filePath string
return Task

CreateBlockBlobAsync() public method

Creates a new block blob and populates it from a stream
public CreateBlockBlobAsync ( string blobId, string contentType, Stream data ) : Task
blobId string The blobId for the block blob
contentType string The content type for the block blob
data Stream The data to store in the block blob
return Task

CreateBlockBlobAsync() public method

Creates a new block blob and populates it from a byte array
public CreateBlockBlobAsync ( string blobId, string contentType, byte data ) : Task
blobId string The blobId for the block blob
contentType string The content type for the block blob
data byte The data to store in the block blob
return Task

CreateBlockBlobAsync() public method

Creates a new block blob and populates it from a string
public CreateBlockBlobAsync ( string blobId, string contentType, string data ) : Task
blobId string The blobId for the block blob
contentType string The content type for the block blob
data string The data to store in the block blob
return Task

DeleteBlobAsync() public method

Deletes the block blob with the given unique blob name
public DeleteBlobAsync ( string blobId ) : System.Threading.Tasks.Task
blobId string The unique block blob identifier
return System.Threading.Tasks.Task

DeleteBlobContainerAsync() public method

Deletes the blob container
public DeleteBlobContainerAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

GetAppendBlockBlobReference() public method

public GetAppendBlockBlobReference ( string blobId ) : Microsoft.WindowsAzure.Storage.Blob.CloudAppendBlob
blobId string
return Microsoft.WindowsAzure.Storage.Blob.CloudAppendBlob

GetBlockBlobDataAsStreamAsync() public method

Returns as stream with the contents of a block blob with the given blob name
public GetBlockBlobDataAsStreamAsync ( string blobId ) : Task
blobId string
return Task

GetBlockBlobDataAsStringAsync() public method

Returns as string with the contents of a block blob with the given blob name
public GetBlockBlobDataAsStringAsync ( string blobId ) : Task
blobId string
return Task

GetBlockBlobReference() public method

Gets a reference to a block blob with the given unique blob name
public GetBlockBlobReference ( string blobId ) : Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob
blobId string The unique block blob identifier
return Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob

ListBlobsInContainer() public method

Returns a list of all the blobs in a container
public ListBlobsInContainer ( string containerName ) : IEnumerable
containerName string
return IEnumerable