Class TapExtensionsAsync
- Namespace
- FunctionalDdd
- Assembly
- FunctionalDdd.RailwayOrientedProgramming.dll
Provides asynchronous extension methods for executing side effects on successful Results without changing the Result.
public static class TapExtensionsAsync
- Inheritance
-
TapExtensionsAsync
- Inherited Members
Methods
TapAsync<TValue>(Result<TValue>, Func<Task>)
Asynchronously executes the given async action if the result is a success. Returns the original result unchanged.
public static Task<Result<TValue>> TapAsync<TValue>(this Result<TValue> result, Func<Task> func)
Parameters
resultResult<TValue>The result to tap.
funcFunc<Task>The async action to execute if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(Result<TValue>, Func<ValueTask>)
Asynchronously executes the given async action if the result is a success. Returns the original result unchanged.
public static ValueTask<Result<TValue>> TapAsync<TValue>(this Result<TValue> result, Func<ValueTask> func)
Parameters
resultResult<TValue>The result to tap.
funcFunc<ValueTask>The async action to execute if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(Result<TValue>, Func<TValue, Task>)
Asynchronously executes the given async action with the value if the result is a success. Returns the original result unchanged.
public static Task<Result<TValue>> TapAsync<TValue>(this Result<TValue> result, Func<TValue, Task> func)
Parameters
resultResult<TValue>The result to tap.
funcFunc<TValue, Task>The async action to execute with the value if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(Result<TValue>, Func<TValue, ValueTask>)
Asynchronously executes the given async action with the value if the result is a success. Returns the original result unchanged.
public static ValueTask<Result<TValue>> TapAsync<TValue>(this Result<TValue> result, Func<TValue, ValueTask> func)
Parameters
resultResult<TValue>The result to tap.
funcFunc<TValue, ValueTask>The async action to execute with the value if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(Task<Result<TValue>>, Action)
Asynchronously executes the given action if the result is a success. Returns the original result unchanged.
public static Task<Result<TValue>> TapAsync<TValue>(this Task<Result<TValue>> resultTask, Action action)
Parameters
resultTaskTask<Result<TValue>>The task containing the result to tap.
actionActionThe action to execute if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(Task<Result<TValue>>, Action<TValue>)
Asynchronously executes the given action with the value if the result is a success. Returns the original result unchanged.
public static Task<Result<TValue>> TapAsync<TValue>(this Task<Result<TValue>> resultTask, Action<TValue> action)
Parameters
resultTaskTask<Result<TValue>>The task containing the result to tap.
actionAction<TValue>The action to execute with the value if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(Task<Result<TValue>>, Func<Task>)
Asynchronously executes the given async action if the result is a success. Returns the original result unchanged.
public static Task<Result<TValue>> TapAsync<TValue>(this Task<Result<TValue>> resultTask, Func<Task> func)
Parameters
resultTaskTask<Result<TValue>>The task containing the result to tap.
funcFunc<Task>The async action to execute if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(Task<Result<TValue>>, Func<TValue, Task>)
Asynchronously executes the given async action with the value if the result is a success. Returns the original result unchanged.
public static Task<Result<TValue>> TapAsync<TValue>(this Task<Result<TValue>> resultTask, Func<TValue, Task> func)
Parameters
resultTaskTask<Result<TValue>>The task containing the result to tap.
funcFunc<TValue, Task>The async action to execute with the value if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(ValueTask<Result<TValue>>, Action)
Asynchronously executes the given action if the result is a success. Returns the original result unchanged.
public static ValueTask<Result<TValue>> TapAsync<TValue>(this ValueTask<Result<TValue>> resultTask, Action action)
Parameters
resultTaskValueTask<Result<TValue>>The ValueTask containing the result to tap.
actionActionThe action to execute if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(ValueTask<Result<TValue>>, Action<TValue>)
Asynchronously executes the given action with the value if the result is a success. Returns the original result unchanged.
public static ValueTask<Result<TValue>> TapAsync<TValue>(this ValueTask<Result<TValue>> resultTask, Action<TValue> action)
Parameters
resultTaskValueTask<Result<TValue>>The ValueTask containing the result to tap.
actionAction<TValue>The action to execute with the value if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(ValueTask<Result<TValue>>, Func<ValueTask>)
Asynchronously executes the given async action if the result is a success. Returns the original result unchanged.
public static ValueTask<Result<TValue>> TapAsync<TValue>(this ValueTask<Result<TValue>> resultTask, Func<ValueTask> valueTask)
Parameters
resultTaskValueTask<Result<TValue>>The ValueTask containing the result to tap.
valueTaskFunc<ValueTask>The async action to execute if the result is successful.
Returns
Type Parameters
TValueType of the result value.
TapAsync<TValue>(ValueTask<Result<TValue>>, Func<TValue, ValueTask>)
Asynchronously executes the given async action with the value if the result is a success. Returns the original result unchanged.
public static ValueTask<Result<TValue>> TapAsync<TValue>(this ValueTask<Result<TValue>> resultTask, Func<TValue, ValueTask> valueTask)
Parameters
resultTaskValueTask<Result<TValue>>The ValueTask containing the result to tap.
valueTaskFunc<TValue, ValueTask>The async action to execute with the value if the result is successful.
Returns
Type Parameters
TValueType of the result value.