Interface ISupplier<TResult>
Represents functional interface returning arbitrary value.
Inherited Members
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public interface ISupplier<out TResult> : IFunctional<Func<TResult>>
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.
Properties
| Edit this page View SourceNullOrDefault
Gets a supplier of default value for type TResult
.
Declaration
public static ISupplier<out TResult?> NullOrDefault { get; }
Property Value
Type | Description |
---|---|
ISupplier<TResult> |
Methods
| Edit this page View SourceInvoke()
Invokes the supplier.
Declaration
TResult Invoke()
Returns
Type | Description |
---|---|
TResult | The value returned by this supplier. |