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
Inherited Members
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 SourceReadOnlySpanConsumer(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 SourceIsEmpty
Gets a value indicating that the underlying delegate is null.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |