Show / Hide Table of Contents

Interface ISupplier<TResult>

Represents functional interface returning arbitrary value.

Inherited Members
IFunctional.DynamicInvoke(scoped ref readonly Variant, int, scoped Variant)
IFunctional.GetArgument<T>(ref readonly Variant, int)
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public interface ISupplier<out TResult> : IFunctional where TResult : allows ref struct
Type Parameters
Name Description
TResult

The type of the result.

Remarks

Functional interface can be used to pass some application logic without heap allocation in contrast to regular delegates. Additionally, implementation of functional interface may have encapsulated data acting as closure which is not allocated on the heap.

Methods

View Source

Invoke()

Invokes the supplier.

Declaration
TResult Invoke()
Returns
Type Description
TResult

The value returned by this supplier.

Extension Methods

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