Exemple #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));
Exemple #2
0
 public static async Task <OperationResult <TPrimary> > DoAsync <TPrimary>(this OperationResult <TPrimary> primaryOperationResult, Task <OperationResult> secondaryOperationResult)
 => primaryOperationResult.Do(await secondaryOperationResult);
Exemple #3
0
 public static OperationResult Do(this OperationResult primaryOperationResult, Func <OperationResult, OperationResult> secondaryOperation)
 => primaryOperationResult.Do(
     secondaryOperation.AssertNotNull(nameof(secondaryOperation))
     .Invoke(primaryOperationResult));