Delegates all stream access to an underlying stream. Disposing this stream
will not dispose the wrapped stream unless the derived implementation
does that explicitly.
- Namespace
- Statiq.Common
- Interfaces
-
- IDisposable
- IAsyncDisposable
- Base Types
-
- object
- MarshalByRefObject
- Stream
- Derived Types
-
Syntax
public abstract class DelegatingStream : Stream, IDisposable, IAsyncDisposable
Constructors
Properties
Methods
Name |
Return Value |
Summary |
BeginRead(byte[], int, int, AsyncCallback, object) |
IAsyncResult |
|
BeginWrite(byte[], int, int, AsyncCallback, object) |
IAsyncResult |
|
CopyTo(Stream, int) |
void |
|
CopyToAsync(Stream, int, CancellationToken) |
Task |
|
EndRead(IAsyncResult) |
int |
|
EndWrite(IAsyncResult) |
void |
|
Flush() |
void |
|
FlushAsync(CancellationToken) |
Task |
|
Read(byte[], int, int) |
int |
|
ReadAsync(byte[], int, int, CancellationToken) |
Task<int> |
|
ReadByte() |
int |
|
Seek(long, SeekOrigin) |
long |
|
SetLength(long) |
void |
|
Write(byte[], int, int) |
void |
|
WriteAsync(byte[], int, int, CancellationToken) |
Task |
|
WriteByte(byte) |
void |
|
Extension Methods
Name |
Value |
Summary |
CopyToAsync(TextWriter, int) |
Task |
Copies a Stream to a System.IO.TextWriter using a buffer and leaves the stream
open after copying.
|
GetWriter(bool) |
StreamWriter |
Creates a StreamWriter for the specified stream. The
biggest difference between this and creating a StreamWriter
directly is that the new StreamWriter will default to
leaving the underlying stream open on disposal. Remember to flush the
returned writer after all data have been written.
|
ReadToEnd() |
string |
|
ThrowIfNull<DelegatingStream>(string) |
T |
|
ToDocument<DelegatingStream>(IContentProvider) |
IDocument |
|
ToDocument<DelegatingStream>(IEnumerable<KeyValuePair<string, object>>, IContentProvider) |
IDocument |
|
ToDocument<DelegatingStream>(NormalizedPath, IContentProvider) |
IDocument |
|
ToDocument<DelegatingStream>(NormalizedPath, IEnumerable<KeyValuePair<string, object>>, IContentProvider) |
IDocument |
|
ToDocument<DelegatingStream>(NormalizedPath, NormalizedPath, IContentProvider) |
IDocument |
|
ToDocument<DelegatingStream>(NormalizedPath, NormalizedPath, IEnumerable<KeyValuePair<string, object>>, IContentProvider) |
IDocument |
|