I think the overload of TapIf with the signature (this Task resultTask, Func predicate, Action action) is missing (hopefully my implementation is correct):
public static async Task<Result> TapIf(this Task<Result> resultTask, Func<bool> predicate, Action action)
{
Result result = await resultTask.DefaultAwait();
if (result.IsSuccess && predicate())
return result.Tap(action);
else
return result;
}
I think the overload of TapIf with the signature (this Task resultTask, Func predicate, Action action ) is missing (hopefully my implementation is correct):