Show / Hide Table of Contents

Struct Supplier<T1, T2, TResult>

Represents typed function pointer implementing ISupplier<T1, T2, TResult>.

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

The type of the first argument.

T2

The type of the second argument.

TResult

The type of the result.

Remarks

Wraps the function pointer.

Constructors

| Edit this page View Source

Supplier(delegate*<T1, T2, TResult>)

Represents typed function pointer implementing ISupplier<T1, T2, TResult>.

Declaration
public Supplier(delegate*<T1, T2, TResult> ptr)
Parameters
Type Name Description
delegate*<T1, T2, TResult> ptr

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.

Methods

| Edit this page View Source

ToDelegate()

Converts this supplier to the delegate of type Func<T1, T2, TResult>.

Declaration
public Func<T1, T2, TResult> ToDelegate()
Returns
Type Description
Func<T1, T2, TResult>

The delegate representing the wrapped method.

Exceptions
Type Condition
ArgumentNullException

ptr is zero.

| Edit this page View Source

ToString()

Gets hexadecimal representation of this pointer.

Declaration
public override string ToString()
Returns
Type Description
string

Hexadecimal representation of this pointer.

Overrides
ValueType.ToString()
Exceptions
Type Condition
ArgumentNullException

ptr is zero.

Operators

| Edit this page View Source

explicit operator Func<T1, T2, TResult>(Supplier<T1, T2, TResult>)

Converts this supplier to the delegate of type Func<T1, T2, TResult>.

Declaration
public static explicit operator Func<T1, T2, TResult>(Supplier<T1, T2, TResult> supplier)
Parameters
Type Name Description
Supplier<T1, T2, TResult> supplier

The value representing the pointer to the method.

Returns
Type Description
Func<T1, T2, TResult>

The delegate representing the wrapped method.

Exceptions
Type Condition
ArgumentNullException

ptr is zero.

| Edit this page View Source

implicit operator Supplier<T1, T2, TResult>(delegate*<T1, T2, TResult>)

Wraps the function pointer.

Declaration
public static implicit operator Supplier<T1, T2, TResult>(delegate*<T1, T2, TResult> ptr)
Parameters
Type Name Description
delegate*<T1, T2, TResult> ptr

The pointer to the managed method.

Returns
Type Description
Supplier<T1, T2, TResult>

The typed function pointer.

Exceptions
Type Condition
ArgumentNullException

ptr is zero.

Implements

ISupplier<T1, T2, 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
☀
☾