public static class ResultExtensions| Err(String) |
Creates a result as the Err variant; with the given error information: errorMessage.
C# |
| Err(String, Exception) |
Creates a result as the Err variant; with the given error information: when, exception.
C# |
| Err(String, String) | Creates a result as the Err variant; with the given error information: errorMessage, when. |
| Err(String, String, Exception) |
Creates a result as the Err variant; with the given error information: errorMessage, when, exception.
C# |
| ErrT(String) |
Creates a result of T as Err with the given errorMessage.
C# |
| ErrT(String, String) | Creates a result of T as Err with the given errorMessage which is observed during when. |
| Flatten(ResRes) |
Flattens the result of result; i.e., Res<Res> -> Res, by mapping:
C# |
| FlattenT(ResResT) |
Flattens the result of result of T; i.e., Res<Res<T>> -> Res<T>, by mapping:
C# |
| IntoResT(OptT) |
Shorthand for mapping options to results as follows:
|
| IntoResT(OptT, String) |
Shorthand for mapping options to results as follows:
|
| MapT1, T2, TOut(ResValueTupleT1, T2, FuncT1, T2, TOut) |
Allows a result of a tuple (t1, t2) to map with a function taking two arguments t1 and t2.
C# |
| MapT1, T2, TOut(ResValueTupleT1, T2, FuncT1, T2, TaskTOut) |
(async version) Allows a result of a tuple (t1, t2) to map with a function taking two arguments t1 and t2.
C# |
| MapReduceT(IEnumerableT, FuncT, Res) |
Applies the result mapper to the collection and reduces it to a single result:
|
| MapReduceT, TOut(IEnumerableT, FuncT, ResTOut) |
Applies the result mapper to the collection and reduces it to a single result:
|
| MapReduceAsyncT(IEnumerableT, FuncT, TaskRes) |
(async version)
Applies the result mapper to the collection and reduces it to a single result:
|
| MapReduceAsyncT, TOut(IEnumerableT, FuncT, TaskResTOut) |
(async version)
Applies the result mapper to the collection and reduces it to a single result:
|
| Ok |
Creates a result as the Ok variant.
C# |
| OkT(T) |
Creates a result of T as Ok variant with value value.
However, if the value is null, it will map into Err.
C# |
| OkIf(Boolean, String) |
Creates a result as Ok variant if the okCondition holds.
Otherwise, it will map into an Err.
C# |
| OkIfT(Boolean, T, String) |
Creates a result of T as Ok variant with value value if the okCondition holds.
Otherwise, it will map into an Err.
C# |
| OkIfT(Boolean, FuncT, String) |
Creates a result of T as Ok variant with value lazyGetValue() if the okCondition holds.
Otherwise, it will map into an Err.
Note that the lazyGetValue is only evaluated if the okCondition holds.
C# |
| OkIfNotnullT |
Creates a result of T as Ok variant with the given value.
However, if the value is null, it will map into Err.
C# |
| Reduce(IEnumerableRes) |
Reduces the collection of results to a single result:
|
| ReduceT(IEnumerableResT) |
Reduces the collection of results to result of list of values:
|
| ReduceAsync(IEnumerableTaskRes) |
(async version)
Reduces the collection of results to a single result:
|
| ReduceAsyncT(IEnumerableTaskResT) |
(async version)
Reduces the collection of results to result of list of values:
|