Struct ConsumerClosure<TContext, T>
Represents implementation of IConsumer<T> interface with the support of closure that is not allocated on the heap.
Inherited Members
Namespace: DotNext
Assembly: DotNext.dll
Syntax
[CLSCompliant(false)]
public readonly struct ConsumerClosure<TContext, T> : IConsumer<T>, IFunctional<Action<T>>
Type Parameters
Name | Description |
---|---|
TContext | The type describing closure. |
T | The type of the consumer argument. |
Remarks
Wraps the function pointer.
Constructors
| Edit this page View SourceConsumerClosure(delegate*<in TContext, T, void>, TContext)
Represents implementation of IConsumer<T> interface with the support of closure that is not allocated on the heap.
Declaration
public ConsumerClosure(delegate*<in TContext, T, void> ptr, TContext context)
Parameters
Type | Name | Description |
---|---|---|
delegate*<in TContext, T, void> | ptr | The function pointer. |
TContext | context | The context to be passed to the function pointer. |
Remarks
Wraps the function pointer.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Properties
| Edit this page View SourceIsEmpty
Gets a value indicating that this function pointer is zero.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|