async Task IFilter <TContext> .Send(TContext context, IPipe <TContext> next) { var bindPipe = new BindPipe(context, _output); await _source.Send(context, bindPipe).ConfigureAwait(false); await next.Send(context).ConfigureAwait(false); }
Task IFilter <TLeft> .Send(TLeft context, IPipe <TLeft> next) { var bindPipe = new BindPipe(context, _output); var sourceTask = _source.Send(context, bindPipe); if (sourceTask.IsCompletedSuccessfully()) { return(next.Send(context)); } async Task SendAsync() { await sourceTask.ConfigureAwait(false); await next.Send(context).ConfigureAwait(false); } return(SendAsync()); }