Show / Hide Table of Contents

Struct StreamConsumer

Represents implementation of IReadOnlySpanConsumer<T> in the form of the writer to Stream.

Implements
IReadOnlySpanConsumer<byte>
ISupplier<ReadOnlyMemory<byte>, CancellationToken, ValueTask>
IFunctional<Func<ReadOnlyMemory<byte>, CancellationToken, ValueTask>>
IEquatable<StreamConsumer>
IFlushable
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
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>>, IEquatable<StreamConsumer>, IFlushable

Constructors

| Edit this page View Source

StreamConsumer(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 Source

IsEmpty

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 Source

ToString()

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
ValueType.ToString()

Operators

| Edit this page View Source

implicit 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

output is null.

Implements

IReadOnlySpanConsumer<T>
ISupplier<T1, T2, TResult>
IFunctional<TDelegate>
IEquatable<T>
IFlushable

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
Collection.ToAsyncEnumerator<TEnumerator, T>(TEnumerator, CancellationToken)
Collection.ToClassicEnumerator<TEnumerator, T>(TEnumerator)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
ExpressionBuilder.Const<T>(T)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾