Show / Hide Table of Contents

Struct SupplierClosure<TContext, TResult>

Represents implementation of ISupplier<TResult> interface with the support of closure that is not allocated on the heap.

Implements
ISupplier<TResult>
IFunctional<Func<TResult>>
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext
Assembly: DotNext.dll
Syntax
[CLSCompliant(false)]
public readonly struct SupplierClosure<TContext, TResult> : ISupplier<TResult>, IFunctional<Func<TResult>>
Type Parameters
Name Description
TContext

The type describing closure.

TResult

The type of the result.

Remarks

Wraps the function pointer.

Constructors

| Edit this page View Source

SupplierClosure(delegate*<in TContext, TResult>, TContext)

Represents implementation of ISupplier<TResult> interface with the support of closure that is not allocated on the heap.

Declaration
public SupplierClosure(delegate*<in TContext, TResult> ptr, TContext context)
Parameters
Type Name Description
delegate*<in TContext, TResult> ptr

The function pointer.

TContext context

The context to be passed to the function pointer.

Remarks

Wraps the function pointer.

Exceptions
Type Condition
ArgumentNullException

ptr is zero.

Properties

| Edit this page View Source

IsEmpty

Gets a value indicating that this function pointer is zero.

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

ptr is zero.

Implements

ISupplier<TResult>
IFunctional<TDelegate>

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