NanoByte.Common  2.9.0
NanoByte.Common.Streams.ShadowingStream Class Reference

Decorator that copies all bytes read from a Stream to another Stream. More...

Inheritance diagram for NanoByte.Common.Streams.ShadowingStream:
NanoByte.Common.Streams.DelegatingStream

Public Member Functions

 ShadowingStream (Stream underlyingStream, Stream shadowStream)
 Creates a new shadowing stream. More...
 
override int Read (byte[] buffer, int offset, int count)
 
override async Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override async ValueTask< int > ReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default)
 
- Public Member Functions inherited from NanoByte.Common.Streams.DelegatingStream
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)
 
override Task FlushAsync (CancellationToken cancellationToken)
 
override Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override int Read (Span< byte > buffer)
 
override ValueTask< int > ReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default)
 
override void Write (ReadOnlySpan< byte > buffer)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default)
 

Additional Inherited Members

- Protected Member Functions inherited from NanoByte.Common.Streams.DelegatingStream
 DelegatingStream (Stream underlyingStream)
 Creates a new delegating stream. More...
 
override void Dispose (bool disposing)
 
- Protected Attributes inherited from NanoByte.Common.Streams.DelegatingStream
readonly Stream UnderlyingStream
 Underlying stream to delegate to. More...
 
- Properties inherited from NanoByte.Common.Streams.DelegatingStream
override bool CanRead [get]
 
override bool CanSeek [get]
 
override bool CanWrite [get]
 
override long Length [get]
 
override bool CanTimeout [get]
 
override int ReadTimeout [get]
 
override int WriteTimeout [get]
 
override long Position [get, set]
 

Detailed Description

Decorator that copies all bytes read from a Stream to another Stream.

Constructor & Destructor Documentation

◆ ShadowingStream()

NanoByte.Common.Streams.ShadowingStream.ShadowingStream ( Stream  underlyingStream,
Stream  shadowStream 
)
inline

Creates a new shadowing stream.

Parameters
underlyingStreamUnderlying stream to delegate to. Will be disposed together with this stream.
shadowStreamThe stream to copy all read bytes to.

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