C# Class OpenStack.IO.ProgressStream

This class operates as a wrapper around an underlying Stream instance which reports progress to an IProgress{T} instance.
Inheritance: DelegatingStream
Afficher le fichier Open project: crowdy/OpenStack-ConoHa

Méthodes publiques

Méthode Description
CopyToAsync ( System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken ) : System.Threading.Tasks.Task
EndRead ( IAsyncResult asyncResult ) : int
EndWrite ( IAsyncResult asyncResult ) : void
FlushAsync ( System.Threading.CancellationToken cancellationToken ) : System.Threading.Tasks.Task
ProgressStream ( System.IO.Stream underlyingStream, IProgress progress ) : System

Initializes a new instance of the ProgressStream class from the specified Stream and IProgress{T} handler.

ProgressStream ( System.IO.Stream underlyingStream, IProgress progress, bool ownsStream ) : System

Initializes a new instance of the ProgressStream class from the specified Stream and IProgress{T} handler.

Read ( byte buffer, int offset, int count ) : int
ReadAsync ( byte buffer, int offset, int count, System.Threading.CancellationToken cancellationToken ) : Task
ReadByte ( ) : int
Seek ( long offset, System.IO.SeekOrigin origin ) : long
Write ( byte buffer, int offset, int count ) : void
WriteAsync ( byte buffer, int offset, int count, System.Threading.CancellationToken cancellationToken ) : System.Threading.Tasks.Task
WriteByte ( byte value ) : void

Method Details

CopyToAsync() public méthode

public CopyToAsync ( System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken ) : System.Threading.Tasks.Task
destination System.IO.Stream
bufferSize int
cancellationToken System.Threading.CancellationToken
Résultat System.Threading.Tasks.Task

EndRead() public méthode

public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
Résultat int

EndWrite() public méthode

public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
Résultat void

FlushAsync() public méthode

public FlushAsync ( System.Threading.CancellationToken cancellationToken ) : System.Threading.Tasks.Task
cancellationToken System.Threading.CancellationToken
Résultat System.Threading.Tasks.Task

ProgressStream() public méthode

Initializes a new instance of the ProgressStream class from the specified Stream and IProgress{T} handler.
/// If is . /// -or- /// If is . ///
public ProgressStream ( System.IO.Stream underlyingStream, IProgress progress ) : System
underlyingStream System.IO.Stream The stream to wrap.
progress IProgress The handler to report progress updates to.
Résultat System

ProgressStream() public méthode

Initializes a new instance of the ProgressStream class from the specified Stream and IProgress{T} handler.
/// If is . /// -or- /// If is . ///
public ProgressStream ( System.IO.Stream underlyingStream, IProgress progress, bool ownsStream ) : System
underlyingStream System.IO.Stream The stream to wrap.
progress IProgress The handler to report progress updates to.
ownsStream bool /// if this object owns the wrapped stream, and should dispose /// of it when this instance is closed or disposed. /// -or- /// if this object should not dispose of the wrapped stream. /// The default value is . ///
Résultat System

Read() public méthode

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Résultat int

ReadAsync() public méthode

public ReadAsync ( byte buffer, int offset, int count, System.Threading.CancellationToken cancellationToken ) : Task
buffer byte
offset int
count int
cancellationToken System.Threading.CancellationToken
Résultat Task

ReadByte() public méthode

public ReadByte ( ) : int
Résultat int

Seek() public méthode

public Seek ( long offset, System.IO.SeekOrigin origin ) : long
offset long
origin System.IO.SeekOrigin
Résultat long

Write() public méthode

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Résultat void

WriteAsync() public méthode

public WriteAsync ( byte buffer, int offset, int count, System.Threading.CancellationToken cancellationToken ) : System.Threading.Tasks.Task
buffer byte
offset int
count int
cancellationToken System.Threading.CancellationToken
Résultat System.Threading.Tasks.Task

WriteByte() public méthode

public WriteByte ( byte value ) : void
value byte
Résultat void