コード例 #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);
        }
コード例 #2
0
ファイル: PipelineBuilder.cs プロジェクト: preardon/Brighter
        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);
            }
        }