public AsyncPipelines <TRequest> BuildAsync(IRequestContext requestContext, bool continueOnCapturedContext) { var handlers = _interpreter.GetAsyncHandlers(); var pipelines = new AsyncPipelines <TRequest>(); handlers.Each(handler => pipelines.Add(BuildAsyncPipeline(handler, requestContext, continueOnCapturedContext))); pipelines.Each(handler => handler.AddToLifetime(_instanceScope)); return(pipelines); }
public AsyncPipelines <TRequest> BuildAsync(IRequestContext requestContext, bool continueOnCapturedContext) { try { var handlers = _interpreter.GetAsyncHandlers(); var pipelines = new AsyncPipelines <TRequest>(); handlers.Each(handler => pipelines.Add(BuildAsyncPipeline(handler, requestContext, continueOnCapturedContext))); pipelines.Each(handler => handler.AddToLifetime(_instanceScope)); return(pipelines); } catch (Exception e) when(!(e is ConfigurationException)) { throw new ConfigurationException("Error when building pipeline, see inner Exception for details", e); } }