A read-only, non-seeking stream produced by iterating over a collection of arbitrary objects.
- Namespace
- Statiq.Common
- Interfaces
-
- IDisposable
- IAsyncDisposable
- Base Types
-
- object
- MarshalByRefObject
- Stream
- Derived Types
-
Syntax
public abstract class ItemStream<TItem> : Stream, IDisposable, IAsyncDisposable
Type Parameters
Constructors
Properties
Methods
Name |
Return Value |
Summary |
BeginRead(byte[], int, int, AsyncCallback, object) |
IAsyncResult |
|
BeginWrite(byte[], int, int, AsyncCallback, object) |
IAsyncResult |
|
Close() |
void |
|
CopyTo(Stream, int) |
void |
|
CopyToAsync(Stream, int, CancellationToken) |
Task |
|
CreateWaitHandle() |
WaitHandle |
|
Dispose(bool) |
void |
|
DisposeAsync() |
ValueTask |
|
EndRead(IAsyncResult) |
int |
|
EndWrite(IAsyncResult) |
void |
|
Flush() |
void |
|
FlushAsync(CancellationToken) |
Task |
|
GetItemBytes(TItem) |
ReadOnlySpan<byte> |
Gets the memory for a given item.
|
GetPrefix() |
ReadOnlySpan<byte> |
|
GetSuffix() |
ReadOnlySpan<byte> |
|
InitializeLifetimeService() |
object |
|
ObjectInvariant() |
void |
|
Read(byte[], int, int) |
int |
|
Read(Span<byte>) |
int |
|
ReadAsync(byte[], int, int, CancellationToken) |
Task<int> |
|
ReadAsync(Memory<byte>, CancellationToken) |
ValueTask<int> |
|
ReadByte() |
int |
|
Reset() |
void |
|
Seek(long, SeekOrigin) |
long |
|
SetLength(long) |
void |
|
Write(byte[], int, int) |
void |
|
Write(ReadOnlySpan<byte>) |
void |
|
WriteAsync(byte[], int, int, CancellationToken) |
Task |
|
WriteAsync(ReadOnlyMemory<byte>, CancellationToken) |
ValueTask |
|
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<ItemStream<TItem>>(string) |
T |
|
ToDocument<ItemStream<TItem>>(IContentProvider) |
IDocument |
|
ToDocument<ItemStream<TItem>>(IEnumerable<KeyValuePair<string, object>>, IContentProvider) |
IDocument |
|
ToDocument<ItemStream<TItem>>(NormalizedPath, IContentProvider) |
IDocument |
|
ToDocument<ItemStream<TItem>>(NormalizedPath, IEnumerable<KeyValuePair<string, object>>, IContentProvider) |
IDocument |
|
ToDocument<ItemStream<TItem>>(NormalizedPath, NormalizedPath, IContentProvider) |
IDocument |
|
ToDocument<ItemStream<TItem>>(NormalizedPath, NormalizedPath, IEnumerable<KeyValuePair<string, object>>, IContentProvider) |
IDocument |
|