Struct DelegatingSupplier<T1, T2, TResult>
Represents implementation of ISupplier<T1, T2, TResult> that delegates invocation to the delegate of type Func<T1, T2, TResult>.
Implements
ISupplier<T1, T2, TResult>
IFunctional<Func<T1, T2, TResult>>
IEquatable<DelegatingSupplier<T1, T2, TResult>>
Inherited Members
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public readonly record struct DelegatingSupplier<T1, T2, TResult> : ISupplier<T1, T2, TResult>, IFunctional<Func<T1, T2, TResult>>, IEquatable<DelegatingSupplier<T1, T2, TResult>>
Type Parameters
Name | Description |
---|---|
T1 | The type of the first argument. |
T2 | The type of the second argument. |
TResult | The type of the result. |
Constructors
| Edit this page View SourceDelegatingSupplier(Func<T1, T2, TResult>)
Wraps the delegate instance.
Declaration
public DelegatingSupplier(Func<T1, T2, TResult> func)
Parameters
Type | Name | Description |
---|---|---|
Func<T1, T2, TResult> | func | The delegate instance. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Properties
| Edit this page View SourceIsEmpty
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 SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string? ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
| Edit this page View Sourceimplicit operator DelegatingSupplier<T1, T2, TResult>(Func<T1, T2, TResult>)
Wraps the delegate instance.
Declaration
public static implicit operator DelegatingSupplier<T1, T2, TResult>(Func<T1, T2, TResult> func)
Parameters
Type | Name | Description |
---|---|---|
Func<T1, T2, TResult> | func | The delegate instance. |
Returns
Type | Description |
---|---|
DelegatingSupplier<T1, T2, TResult> | The supplier represented by the delegate. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|