public static Task <TResult> AggregateAsync <TResult>(
     this IReadOnlyStream stream,
     IPayloadProcessor processor,
     CancellationToken cancellationToken
     ) where TResult : new()
 {
     return(stream.Aggregate().RunAsync <TResult>(processor, cancellationToken));
 }
 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)
                ));
 }
 public static Task <TResult> AggregateAsync <TResult>(this IReadOnlyStream stream) where TResult : new()
 {
     return(stream.Aggregate().RunAsync <TResult>());
 }
 private static StreamProcessor Fold(this IReadOnlyStream stream)
 {
     return(stream.Aggregate());
 }