Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
            }
        }