Struct DelegatingReadOnlySpanConsumer<T, TArg>
Represents implementation of IReadOnlySpanConsumer<T> that delegates invocation to the delegate of type ReadOnlySpanAction<T, TArg>.
Implements
Inherited Members
Namespace: DotNext.Buffers
Assembly: DotNext.dll
Syntax
public readonly struct DelegatingReadOnlySpanConsumer<T, TArg> : IReadOnlySpanConsumer<T>, ISupplier<ReadOnlyMemory<T>, CancellationToken, ValueTask>, IFunctional<Func<ReadOnlyMemory<T>, CancellationToken, ValueTask>>
Type Parameters
| Name | Description |
|---|---|
| T | The type of the consumer argument. |
| TArg | The type of the argument to be passed to the delegate. |
Constructors
| Edit this page View SourceDelegatingReadOnlySpanConsumer(ReadOnlySpanAction<T, TArg>, TArg)
Wraps the delegate instance.
Declaration
public DelegatingReadOnlySpanConsumer(ReadOnlySpanAction<T, TArg> action, TArg arg)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpanAction<T, TArg> | action | The delegate instance. |
| TArg | arg | The argument to be passed to the function represented by the delegate. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Properties
| Edit this page View SourceIsEmpty
Gets a value indicating that the underlying delegate is null.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |