Interface ISupplier<T, TResult>
Represents functional interface returning arbitrary value and accepting the single argument.
Inherited Members
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public interface ISupplier<in T, out TResult> : IFunctional<Func<T, TResult>>
Type Parameters
Name | Description |
---|---|
T | The type of the argument. |
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
| Edit this page View SourceInvoke(T)
Invokes the supplier.
Declaration
TResult Invoke(T arg)
Parameters
Type | Name | Description |
---|---|---|
T | arg | The first argument. |
Returns
Type | Description |
---|---|
TResult | The value returned by this supplier. |