public static IOperationResult Pipe(this IOperationResult operation, Func <IOperationResult> func) { if (operation.Fail()) { return(operation); } return(func()); }
public static async Task <IOperationResult> Pipe(this IOperationResult operation, Func <Task <IOperationResult> > func) { if (operation.Fail()) { return(operation); } return(await func().ConfigureAwait(false)); }
public static bool Success(this IOperationResult op) => !op.Fail();
public static bool IsFail(this IOperationResult op) => op.Fail();