Show / Hide Table of Contents

Struct ReadOnlySpanConsumer<T, TContext>

Represents implementation of IConsumer<T> and ISupplier<T1, T2, TResult> interfaces that delegates invocation to the delegate of type ReadOnlySpanAction<T, TArg>.

Implements
IConsumer<ReadOnlySpan<T>>
ISupplier<ReadOnlyMemory<T>, CancellationToken, ValueTask>
IFunctional
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext.Buffers
Assembly: DotNext.dll
Syntax
public readonly struct ReadOnlySpanConsumer<T, TContext> : IConsumer<ReadOnlySpan<T>>, ISupplier<ReadOnlyMemory<T>, CancellationToken, ValueTask>, IFunctional
Type Parameters
Name Description
T

The type of the span elements.

TContext

The type of the argument to be passed to the delegate.

Constructors

View Source

ReadOnlySpanConsumer(ReadOnlySpanAction<T, TContext>, TContext)

Represents implementation of IConsumer<T> and ISupplier<T1, T2, TResult> interfaces that delegates invocation to the delegate of type ReadOnlySpanAction<T, TArg>.

Declaration
public ReadOnlySpanConsumer(ReadOnlySpanAction<T, TContext> action, TContext context)
Parameters
Type Name Description
ReadOnlySpanAction<T, TContext> action

The delegate instance.

TContext context

The argument to be passed to the function represented by the delegate.

Properties

View Source

IsEmpty

Gets a value indicating that the underlying delegate is null.

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
bool

Implements

IConsumer<T>
ISupplier<T1, T2, TResult>
IFunctional

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾