public static OperationResult BranchOnFailureWhen(this OperationResult currentOperationResult, bool condition, Action branchAction) => currentOperationResult .BranchWhen(x => x.IsFailure && condition, branchAction);
public static OperationResult <T> BranchOnFailureWhen <T>(this OperationResult <T> currentOperationResult, Predicate <IOperationError> condition, Action <IOperationError> branchAction) => currentOperationResult .BranchWhen(x => x.IsFailure && condition.AssertNotNull(nameof(condition)) .Invoke(x.Error), x => branchAction.AssertNotNull(nameof(branchAction)) .Invoke(x.Error));
public static OperationResult BranchOnFailureWhen(this OperationResult currentOperationResult, bool condition, Action <IOperationError> branchAction) => currentOperationResult .BranchWhen(x => x.IsFailure && condition, x => branchAction.AssertNotNull(nameof(branchAction)) .Invoke(x.Error));
public static OperationResult <T> BranchOnFailureWhen <T>(this OperationResult <T> currentOperationResult, Predicate condition, Action branchAction) => currentOperationResult .BranchWhen(x => x.IsFailure && condition.AssertNotNull(nameof(condition)) .Invoke(), branchAction);
public static OperationResult <T> BranchOnSuccess <T>(this OperationResult <T> prevOperationResult, Action <T> branchAction) => prevOperationResult .BranchWhen(x => x.IsSuccess, x => branchAction.AssertNotNull(nameof(branchAction)) .Invoke(x.Value));
public static OperationResult BranchOnSuccess(this OperationResult prevOperationResult, Action branchAction) => prevOperationResult .BranchWhen(x => x.IsSuccess, branchAction);
public static OperationResult BranchOnSuccessWhen(this OperationResult currentOperationResult, bool condition, Action branchAction) => currentOperationResult .BranchWhen(x => x.IsSuccess && condition, branchAction);
public static OperationResult <T> BranchOnSuccessWhen <T>(this OperationResult <T> currentOperationResult, Predicate <T> condition, Action <T> branchAction) => currentOperationResult .BranchWhen(x => x.IsSuccess && condition.AssertNotNull(nameof(condition)) .Invoke(x.Value), x => branchAction.AssertNotNull(nameof(branchAction)) .Invoke(x.Value));
public static OperationResult BranchOnSuccessWhen(this OperationResult currentOperationResult, Predicate condition, Action branchAction) => currentOperationResult .BranchWhen(x => x.IsSuccess && condition.AssertNotNull(nameof(condition)) .Invoke(), branchAction);
public static OperationResult BranchOnFailure(this OperationResult currentOperationResult, Action branchAction) => currentOperationResult .BranchWhen(x => x.IsFailure, branchAction);
public static OperationResult <T> BranchOnFailure <T>(this OperationResult <T> currentOperationResult, Action <IOperationError> branchAction) => currentOperationResult .BranchWhen(x => x.IsFailure, x => branchAction.AssertNotNull(nameof(branchAction)) .Invoke(x.Error));