Method ValueOrDefault
- Namespace
- SodaFlow.Functional
- Assembly
- SodaFlow.Functional.dll
ValueOrDefault<T>(Task<Maybe<T>>)
Returns the value the task gives if there is one, and the default for its type otherwise.
public static Task<T?> ValueOrDefault<T>(this Task<Maybe<T>> a)
Parameters
Returns
Type Parameters
TThe type of the value, when there is one.
Remarks
Carries the caveat on ValueOrDefault<T>(Maybe<T>): for a type whose default is itself a legitimate value, the answer cannot say which case it got.