Exemplo n.º 1
0
 public static OperationResult <TPrimary> Do <TPrimary, TSecondary>(this OperationResult <TPrimary> primaryOperationResult, Func <OperationResult <TPrimary>, OperationResult <TSecondary> > secondaryOperation)
 => primaryOperationResult.Do(
     secondaryOperation.AssertNotNull(nameof(secondaryOperation))
     .Invoke(primaryOperationResult));
Exemplo n.º 2
0
 public static async Task <OperationResult <TPrimary> > DoAsync <TPrimary>(this OperationResult <TPrimary> primaryOperationResult, Task <OperationResult> secondaryOperationResult)
 => primaryOperationResult.Do(await secondaryOperationResult);
Exemplo n.º 3
0
 public static OperationResult Do(this OperationResult primaryOperationResult, Func <OperationResult, OperationResult> secondaryOperation)
 => primaryOperationResult.Do(
     secondaryOperation.AssertNotNull(nameof(secondaryOperation))
     .Invoke(primaryOperationResult));