NanoByte.Common  2.7.5
NanoByte.Common.Streams.DisposeWrapperStream Class Reference

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. More...

Inheritance diagram for NanoByte.Common.Streams.DisposeWrapperStream:

Public Member Functions

 DisposeWrapperStream (Stream baseStream, Action disposeHandler)
 Creates a new dispose wrapper stream. More...
 
override void Flush ()
 
override long Seek (long offset, SeekOrigin origin)
 
override void SetLength (long value)
 
override int Read (byte[] buffer, int offset, int count)
 
override void Write (byte[] buffer, int offset, int count)
 

Protected Member Functions

override void Dispose (bool disposing)
 

Properties

override bool CanRead [get]
 
override bool CanSeek [get]
 
override bool CanWrite [get]
 
override long Length [get]
 
override long Position [get, set]
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DisposeWrapperStream()

NanoByte.Common.Streams.DisposeWrapperStream.DisposeWrapperStream ( Stream  baseStream,
Action  disposeHandler 
)
inline

Creates a new dispose wrapper stream.

Parameters
baseStreamThe underlying Stream providing the actual data. Will be disposed.
disposeHandlerExecuted before baseStream is disposed.

The documentation for this class was generated from the following file: