Struct StreamConsumer
Represents implementation of IReadOnlySpanConsumer<T> in the form of the writer to Stream.
Implements
Inherited Members
Namespace: DotNext.IO
Assembly: DotNext.dll
Syntax
public readonly record struct StreamConsumer : IReadOnlySpanConsumer<byte>, ISupplier<ReadOnlyMemory<byte>, CancellationToken, ValueTask>, IFunctional<Func<ReadOnlyMemory<byte>, CancellationToken, ValueTask>>, IFlushable, IEquatable<StreamConsumer>
Constructors
| Edit this page View SourceStreamConsumer(Stream)
Represents implementation of IReadOnlySpanConsumer<T> in the form of the writer to Stream.
Declaration
public StreamConsumer(Stream output)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | output | The writable stream. |
Properties
| Edit this page View SourceIsEmpty
Gets a value indicating that the underlying stream is null.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceToString()
Returns a string that represents the underlying stream.
Declaration
public override string? ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the underlying stream. |
Overrides
Operators
| Edit this page View Sourceimplicit operator StreamConsumer(Stream)
Wraps the stream.
Declaration
public static implicit operator StreamConsumer(Stream output)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | output | The writable stream. |
Returns
| Type | Description |
|---|---|
| StreamConsumer | The wrapped stream. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|