Show / Hide Table of Contents

Struct Supplier<TResult>

Represents typed function pointer implementing ISupplier<TResult>.

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

The type of the result.

Remarks

Wraps the function pointer.

Constructors

View Source

Supplier(delegate*<TResult>)

Represents typed function pointer implementing ISupplier<TResult>.

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

The function pointer.

Remarks

Wraps the function pointer.

Exceptions
Type Condition
ArgumentNullException

ptr is zero.

Properties

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

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

View Source

explicit operator Func<TResult>(Supplier<TResult>)

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

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

The value representing the pointer to the method.

Returns
Type Description
Func<TResult>

The delegate representing the wrapped method.

Exceptions
Type Condition
ArgumentNullException

ptr is zero.

View Source

implicit operator Supplier<TResult>(delegate*<TResult>)

Wraps the function pointer.

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

The pointer to the managed method.

Returns
Type Description
Supplier<TResult>

The typed function pointer.

Exceptions
Type Condition
ArgumentNullException

ptr is zero.

Implements

ISupplier<TResult>
IFunctional

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾