예제 #1
0
 public static Task <TResult> AggregateAsync <TResult>(
     this IReadOnlyStream stream,
     IPayloadProcessor processor,
     CancellationToken cancellationToken
     ) where TResult : new()
 {
     return(stream.Aggregate().RunAsync <TResult>(processor, cancellationToken));
 }
예제 #2
0
 public static Task <TResult> AggregateAsync <TResult>(
     this IReadOnlyStream stream,
     Func <TResult, object, Task <object> > processor
     ) where TResult : new()
 {
     return(stream.Aggregate().RunAsync <TResult>(
                new DelegateToLambdaPayloadProcessor <TResult>(processor),
                default(CancellationToken)
                ));
 }
예제 #3
0
 public static Task <TResult> AggregateAsync <TResult>(this IReadOnlyStream stream) where TResult : new()
 {
     return(stream.Aggregate().RunAsync <TResult>());
 }
예제 #4
0
 private static StreamProcessor Fold(this IReadOnlyStream stream)
 {
     return(stream.Aggregate());
 }