C# Class NanoByte.Common.Streams.DisposeWarpperStream

This wrapper stream passes all operations through to an underlying Stream without modifying them. An additional delegate is executed before Stream.Dispose() is passed through.
Inheritance: Stream
Show file Open project: nano-byte/common

Public Methods

Method Description
DisposeWarpperStream ( [ baseStream, [ disposeHandler ) : System

Creates a new dispose wrapper stream.

Flush ( ) : void
Read ( byte buffer, int offset, int count ) : int
Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
Write ( byte buffer, int offset, int count ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Method Details

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DisposeWarpperStream() public method

Creates a new dispose wrapper stream.
public DisposeWarpperStream ( [ baseStream, [ disposeHandler ) : System
baseStream [ The underlying providing the actual data. Will be disposed.
disposeHandler [ Executed before is disposed.
return System

Flush() public method

public Flush ( ) : void
return void

Read() public method

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

SetLength() public method

public SetLength ( long value ) : void
value long
return void

Write() public method

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