Show / Hide Table of Contents

Struct DelegatingSupplier<T, TResult>

Represents implementation of ISupplier<T, TResult> that delegates invocation to the delegate of type Func<T, TResult>.

Implements
ISupplier<T, TResult>
IFunctional<Func<T, TResult>>
IEquatable<DelegatingSupplier<T, TResult>>
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public readonly record struct DelegatingSupplier<T, TResult> : ISupplier<T, TResult>, IFunctional<Func<T, TResult>>, IEquatable<DelegatingSupplier<T, TResult>>
Type Parameters
Name Description
T

The type of the argument.

TResult

The type of the result.

Constructors

| Edit this page View Source

DelegatingSupplier(Func<T, TResult>)

Wraps the delegate instance.

Declaration
public DelegatingSupplier(Func<T, TResult> func)
Parameters
Type Name Description
Func<T, TResult> func

The delegate instance.

Exceptions
Type Condition
ArgumentNullException

func is null.

Properties

| Edit this page View Source

IsEmpty

Gets a value indicating that the underlying delegate is null.

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

Methods

| Edit this page View Source

ToString()

Returns the fully qualified type name of this instance.

Declaration
public override string? ToString()
Returns
Type Description
string

The fully qualified type name.

Overrides
ValueType.ToString()

Operators

| Edit this page View Source

implicit operator DelegatingSupplier<T, TResult>(Func<T, TResult>)

Wraps the delegate instance.

Declaration
public static implicit operator DelegatingSupplier<T, TResult>(Func<T, TResult> func)
Parameters
Type Name Description
Func<T, TResult> func

The delegate instance.

Returns
Type Description
DelegatingSupplier<T, TResult>

The supplier represented by the delegate.

Exceptions
Type Condition
ArgumentNullException

func is null.

Implements

ISupplier<T, TResult>
IFunctional<TDelegate>
IEquatable<T>

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