Show / Hide Table of Contents

Struct BufferConsumer<T>

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

Implements
IReadOnlySpanConsumer<T>
ISupplier<ReadOnlyMemory<T>, CancellationToken, ValueTask>
IFunctional<Func<ReadOnlyMemory<T>, CancellationToken, ValueTask>>
IEquatable<BufferConsumer<T>>
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext.Buffers
Assembly: DotNext.dll
Syntax
public readonly record struct BufferConsumer<T> : IReadOnlySpanConsumer<T>, ISupplier<ReadOnlyMemory<T>, CancellationToken, ValueTask>, IFunctional<Func<ReadOnlyMemory<T>, CancellationToken, ValueTask>>, IEquatable<BufferConsumer<T>>
Type Parameters
Name Description
T

The type of the consumer argument.

Constructors

| Edit this page View Source

BufferConsumer(IBufferWriter<T>)

Wraps the buffer writer.

Declaration
public BufferConsumer(IBufferWriter<T> output)
Parameters
Type Name Description
IBufferWriter<T> output

The buffer writer.

Exceptions
Type Condition
ArgumentNullException

output is null.

Properties

| Edit this page View Source

IsEmpty

Gets a value indicating that the underlying buffer 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 buffer.

Declaration
public override string? ToString()
Returns
Type Description
string

A string that represents the underlying buffer.

Overrides
ValueType.ToString()

Implements

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

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
☀
☾