C# Класс Microsoft.WindowsAzure.Storage.Blob.BlobWriteStream

Наследование: Microsoft.WindowsAzure.Storage.Blob.BlobWriteStreamBase
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Flush ( ) : void

Clears all buffers for this stream and causes any buffered data to be written to the underlying blob.

FlushAsync ( CancellationToken cancellationToken ) : System.Threading.Task

Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.

Seek ( long offset, SeekOrigin origin ) : long

Sets the position within the current stream.

Write ( byte buffer, int offset, int count ) : void

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

WriteAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : System.Threading.Task

Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases the blob resources used by the Stream.

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

Метод Описание
BlobWriteStream ( Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob blockBlob, AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, OperationContext operationContext ) : System

Initializes a new instance of the BlobWriteStream class for a block blob.

BlobWriteStream ( Microsoft.WindowsAzure.Storage.Blob.CloudPageBlob pageBlob, long pageBlobSize, bool createNew, AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, OperationContext operationContext ) : System

Initializes a new instance of the BlobWriteStream class for a page blob.

CommitAsync ( ) : System.Threading.Task

Asynchronously commits the blob. For block blobs, this means uploading the block list. For page blobs, however, it only uploads blob properties.

DispatchWriteAsync ( ) : System.Threading.Task

Asynchronously dispatches a write operation.

WriteBlockAsync ( Stream blockData, string blockId, string blockMD5 ) : System.Threading.Task

Starts an asynchronous PutBlock operation as soon as the parallel operation semaphore becomes available.

Warning CS4014 is disabled here, since we intentionally do not await PutBlockAsync call.

WritePagesAsync ( Stream pageData, long offset, string contentMD5 ) : System.Threading.Task

Starts an asynchronous WritePages operation as soon as the parallel operation semaphore becomes available.

Warning CS4014 is disabled here, since we intentionally do not await WritePagesAsync call.

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

Dispose() защищенный Метод

Releases the blob resources used by the Stream.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

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

Clears all buffers for this stream and causes any buffered data to be written to the underlying blob.
public Flush ( ) : void
Результат void

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

Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.
public FlushAsync ( CancellationToken cancellationToken ) : System.Threading.Task
cancellationToken System.Threading.CancellationToken The token to monitor for cancellation requests.
Результат System.Threading.Task

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

Sets the position within the current stream.
public Seek ( long offset, SeekOrigin origin ) : long
offset long A byte offset relative to the origin parameter.
origin SeekOrigin A value of type SeekOrigin indicating the reference /// point used to obtain the new position.
Результат long

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

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
public Write ( byte buffer, int offset, int count ) : void
buffer byte An array of bytes. This method copies count bytes from /// buffer to the current stream.
offset int The zero-based byte offset in buffer at which to begin /// copying bytes to the current stream.
count int The number of bytes to be written to the current stream.
Результат void

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

Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.
public WriteAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : System.Threading.Task
buffer byte An array of bytes. This method copies count bytes from /// buffer to the current stream.
offset int The zero-based byte offset in buffer at which to begin /// copying bytes to the current stream.
count int The number of bytes to be written to the current stream.
cancellationToken System.Threading.CancellationToken The token to monitor for cancellation requests.
Результат System.Threading.Task