Class TaskResultExtensions
Inheritance
System.Object
TaskResultExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: p1eXu5.Result.dll
Syntax
public static class TaskResultExtensions
Methods
|
Improve this Doc
View Source
Apply<TOkA, TOkB, __>(Task<Result<TOkA, __>>, Task<Result<Func<TOkA, TOkB>, __>>)
TaskResult applicative functor.
Declaration
public static async Task<Result<TOkB, __>> Apply<TOkA, TOkB, __>(this Task<Result<TOkA, __>> task, Task<Result<Func<TOkA, TOkB>, __>> f)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, __>> |
task |
|
Task<Result<Func<TOkA, TOkB>, __>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkB, __>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
__ |
|
|
Improve this Doc
View Source
Bibind<TOkA, TOkB, TErrorA, TErrorB>(Task<Result<TOkA, TErrorA>>, Func<TOkA, Task<Result<TOkB, TErrorB>>>, Func<TErrorA, Task<Result<TOkB, TErrorB>>>)
Declaration
public static async Task<Result<TOkB, TErrorB>> Bibind<TOkA, TOkB, TErrorA, TErrorB>(this Task<Result<TOkA, TErrorA>> task, Func<TOkA, Task<Result<TOkB, TErrorB>>> fs, Func<TErrorA, Task<Result<TOkB, TErrorB>>> fe)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TErrorA>> |
task |
|
Func<TOkA, Task<Result<TOkB, TErrorB>>> |
fs |
|
Func<TErrorA, Task<Result<TOkB, TErrorB>>> |
fe |
|
Returns
Type |
Description |
Task<Result<TOkB, TErrorB>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TErrorA |
|
TErrorB |
|
|
Improve this Doc
View Source
Bimap<TOkA, TOkB, TErrorA, TErrorB>(Task<Result<TOkA, TErrorA>>, Func<TOkA, TOkB>, Func<TErrorA, TErrorB>)
Declaration
public static async Task<Result<TOkB, TErrorB>> Bimap<TOkA, TOkB, TErrorA, TErrorB>(this Task<Result<TOkA, TErrorA>> task, Func<TOkA, TOkB> fs, Func<TErrorA, TErrorB> fe)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TErrorA>> |
task |
|
Func<TOkA, TOkB> |
fs |
|
Func<TErrorA, TErrorB> |
fe |
|
Returns
Type |
Description |
Task<Result<TOkB, TErrorB>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TErrorA |
|
TErrorB |
|
|
Improve this Doc
View Source
Bind<TOkA, TOkB, TError>(Task<Result<TOkA, TError>>, Func<TOkA, Task<Result<TOkB, TError>>>)
Declaration
public static async Task<Result<TOkB, TError>> Bind<TOkA, TOkB, TError>(this Task<Result<TOkA, TError>> task, Func<TOkA, Task<Result<TOkB, TError>>> f)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TError>> |
task |
|
Func<TOkA, Task<Result<TOkB, TError>>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkB, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TError |
|
|
Improve this Doc
View Source
Bind<TOkA, TOkB, TError>(Task<Result<TOkA, TError>>, Func<TOkA, ValueTask<TOkB>>)
Declaration
public static async Task<Result<TOkB, TError>> Bind<TOkA, TOkB, TError>(this Task<Result<TOkA, TError>> taskResult, Func<TOkA, ValueTask<TOkB>> f)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TError>> |
taskResult |
|
Func<TOkA, ValueTask<TOkB>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkB, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TError |
|
|
Improve this Doc
View Source
Bind<TOkA, TOkB, TError>(ValueTask<Result<TOkA, TError>>, Func<TOkA, ValueTask<Result<TOkB, TError>>>)
Declaration
public static async Task<Result<TOkB, TError>> Bind<TOkA, TOkB, TError>(this ValueTask<Result<TOkA, TError>> taskResult, Func<TOkA, ValueTask<Result<TOkB, TError>>> f)
Parameters
Type |
Name |
Description |
ValueTask<Result<TOkA, TError>> |
taskResult |
|
Func<TOkA, ValueTask<Result<TOkB, TError>>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkB, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TError |
|
|
Improve this Doc
View Source
Bind<TOkA, TOkB, TErrorA, TErrorB>(Task<Result<TOkA, TErrorA>>, Func<TOkA, Task<Result<TOkB, TErrorB>>>, Func<TErrorA, TErrorB>)
Declaration
public static async Task<Result<TOkB, TErrorB>> Bind<TOkA, TOkB, TErrorA, TErrorB>(this Task<Result<TOkA, TErrorA>> task, Func<TOkA, Task<Result<TOkB, TErrorB>>> f, Func<TErrorA, TErrorB> fe)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TErrorA>> |
task |
|
Func<TOkA, Task<Result<TOkB, TErrorB>>> |
f |
|
Func<TErrorA, TErrorB> |
fe |
|
Returns
Type |
Description |
Task<Result<TOkB, TErrorB>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TErrorA |
|
TErrorB |
|
|
Improve this Doc
View Source
BindError<TOk, TErrorA, TErrorB>(Task<Result<TOk, TErrorA>>, Func<TErrorA, Task<Result<TOk, TErrorB>>>)
Declaration
public static async Task<Result<TOk, TErrorB>> BindError<TOk, TErrorA, TErrorB>(this Task<Result<TOk, TErrorA>> task, Func<TErrorA, Task<Result<TOk, TErrorB>>> f)
Parameters
Type |
Name |
Description |
Task<Result<TOk, TErrorA>> |
task |
|
Func<TErrorA, Task<Result<TOk, TErrorB>>> |
f |
|
Returns
Type |
Description |
Task<Result<TOk, TErrorB>> |
|
Type Parameters
Name |
Description |
TOk |
|
TErrorA |
|
TErrorB |
|
|
Improve this Doc
View Source
BindV<TOkA, TOkB, TError>(ValueTask<Result<TOkA, TError>>, Func<TOkA, Task<Result<TOkB, TError>>>)
Declaration
public static async ValueTask<Result<TOkB, TError>> BindV<TOkA, TOkB, TError>(this ValueTask<Result<TOkA, TError>> taskResult, Func<TOkA, Task<Result<TOkB, TError>>> f)
Parameters
Type |
Name |
Description |
ValueTask<Result<TOkA, TError>> |
taskResult |
|
Func<TOkA, Task<Result<TOkB, TError>>> |
f |
|
Returns
Type |
Description |
ValueTask<Result<TOkB, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TError |
|
|
Improve this Doc
View Source
Filter<TOkA, TError>(Task<Result<TOkA, TError>>, Predicate<TOkA>, TError)
Declaration
public static async Task<Result<TOkA, TError>> Filter<TOkA, TError>(this Task<Result<TOkA, TError>> task, Predicate<TOkA> filter, TError defaultError)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TError>> |
task |
|
Predicate<TOkA> |
filter |
|
TError |
defaultError |
|
Returns
Type |
Description |
Task<Result<TOkA, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TError |
|
|
Improve this Doc
View Source
FilterError<TOkA, TError>(Task<Result<TOkA, TError>>, Predicate<TError>, TOkA)
Declaration
public static async Task<Result<TOkA, TError>> FilterError<TOkA, TError>(this Task<Result<TOkA, TError>> task, Predicate<TError> filter, TOkA defaultError)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TError>> |
task |
|
Predicate<TError> |
filter |
|
TOkA |
defaultError |
|
Returns
Type |
Description |
Task<Result<TOkA, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TError |
|
|
Improve this Doc
View Source
Map<TOkA, TOkB, TError>(Task<Result<TOkA, TError>>, Func<TOkA, TOkB>)
Declaration
public static async Task<Result<TOkB, TError>> Map<TOkA, TOkB, TError>(this Task<Result<TOkA, TError>> task, Func<TOkA, TOkB> f)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TError>> |
task |
|
Func<TOkA, TOkB> |
f |
|
Returns
Type |
Description |
Task<Result<TOkB, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TError |
|
|
Improve this Doc
View Source
MapError<TOk, TErrorA, TErrorB>(Task<Result<TOk, TErrorA>>, Func<TErrorA, TErrorB>)
Declaration
public static async Task<Result<TOk, TErrorB>> MapError<TOk, TErrorA, TErrorB>(this Task<Result<TOk, TErrorA>> task, Func<TErrorA, TErrorB> f)
Parameters
Type |
Name |
Description |
Task<Result<TOk, TErrorA>> |
task |
|
Func<TErrorA, TErrorB> |
f |
|
Returns
Type |
Description |
Task<Result<TOk, TErrorB>> |
|
Type Parameters
Name |
Description |
TOk |
|
TErrorA |
|
TErrorB |
|
|
Improve this Doc
View Source
MapFlat<TOkA, TOkB, TOkResult, TError>(Task<Result<(TOkA, TOkB), TError>>, Func<TOkA, TOkB, Result<TOkResult, TError>>)
Declaration
public static async Task<Result<TOkResult, TError>> MapFlat<TOkA, TOkB, TOkResult, TError>(this Task<Result<(TOkA, TOkB), TError>> result, Func<TOkA, TOkB, Result<TOkResult, TError>> f)
Parameters
Type |
Name |
Description |
Task<Result<System.ValueTuple<TOkA, TOkB>, TError>> |
result |
|
Func<TOkA, TOkB, Result<TOkResult, TError>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkResult, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TOkResult |
|
TError |
|
|
Improve this Doc
View Source
MapFlat<TOkA, TOkB, TOkC, TOkResult, TError>(Task<Result<(TOkA, TOkB, TOkC), TError>>, Func<TOkA, TOkB, TOkC, Result<TOkResult, TError>>)
Declaration
public static async Task<Result<TOkResult, TError>> MapFlat<TOkA, TOkB, TOkC, TOkResult, TError>(this Task<Result<(TOkA, TOkB, TOkC), TError>> result, Func<TOkA, TOkB, TOkC, Result<TOkResult, TError>> f)
Parameters
Type |
Name |
Description |
Task<Result<System.ValueTuple<TOkA, TOkB, TOkC>, TError>> |
result |
|
Func<TOkA, TOkB, TOkC, Result<TOkResult, TError>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkResult, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TOkC |
|
TOkResult |
|
TError |
|
|
Improve this Doc
View Source
MapFlat<TOkA, TOkB, TOkC, TOkD, TOkResult, TError>(Task<Result<(TOkA, TOkB, TOkC, TOkD), TError>>, Func<TOkA, TOkB, TOkC, TOkD, Result<TOkResult, TError>>)
Declaration
public static async Task<Result<TOkResult, TError>> MapFlat<TOkA, TOkB, TOkC, TOkD, TOkResult, TError>(this Task<Result<(TOkA, TOkB, TOkC, TOkD), TError>> result, Func<TOkA, TOkB, TOkC, TOkD, Result<TOkResult, TError>> f)
Parameters
Type |
Name |
Description |
Task<Result<System.ValueTuple<TOkA, TOkB, TOkC, TOkD>, TError>> |
result |
|
Func<TOkA, TOkB, TOkC, TOkD, Result<TOkResult, TError>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkResult, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TOkC |
|
TOkD |
|
TOkResult |
|
TError |
|
|
Improve this Doc
View Source
MapResult<TOkA, TOkB, TError>(Task<Result<TOkA, TError>>, Func<TOkA, Result<TOkB, TError>>)
Declaration
public static async Task<Result<TOkB, TError>> MapResult<TOkA, TOkB, TError>(this Task<Result<TOkA, TError>> taskResult, Func<TOkA, Result<TOkB, TError>> f)
Parameters
Type |
Name |
Description |
Task<Result<TOkA, TError>> |
taskResult |
|
Func<TOkA, Result<TOkB, TError>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkB, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TError |
|
|
Improve this Doc
View Source
MapResult<TOkA, TOkB, TError>(ValueTask<Result<TOkA, TError>>, Func<TOkA, Result<TOkB, TError>>)
Declaration
public static async Task<Result<TOkB, TError>> MapResult<TOkA, TOkB, TError>(this ValueTask<Result<TOkA, TError>> taskResult, Func<TOkA, Result<TOkB, TError>> f)
Parameters
Type |
Name |
Description |
ValueTask<Result<TOkA, TError>> |
taskResult |
|
Func<TOkA, Result<TOkB, TError>> |
f |
|
Returns
Type |
Description |
Task<Result<TOkB, TError>> |
|
Type Parameters
Name |
Description |
TOkA |
|
TOkB |
|
TError |
|
|
Improve this Doc
View Source
Retn<TOk, TError>(TOk)
Declaration
public static Task<Result<TOk, TError>> Retn<TOk, TError>(this TOk succeededContext)
Parameters
Type |
Name |
Description |
TOk |
succeededContext |
|
Returns
Type |
Description |
Task<Result<TOk, TError>> |
|
Type Parameters
Name |
Description |
TOk |
|
TError |
|
|
Improve this Doc
View Source
Retn<TOk, TError>(Result<TOk, TError>)
Declaration
public static Task<Result<TOk, TError>> Retn<TOk, TError>(this Result<TOk, TError> result)
Parameters
Type |
Name |
Description |
Result<TOk, TError> |
result |
|
Returns
Type |
Description |
Task<Result<TOk, TError>> |
|
Type Parameters
Name |
Description |
TOk |
|
TError |
|