예제 #1
0
        /// <inheritdoc />
        public IPipelines <TRequest, TResponse> Create(IPipelineProfile <TRequest, TResponse> pipelineProfile)
        {
            if (pipelineProfile == null)
            {
                throw new ArgumentNullException(nameof(pipelineProfile));
            }

            return(pipelineProfile.BuildPipelines());
        }
예제 #2
0
        private IPipelineProfile <TRequest, TResponse> AddPipelineProfileInner(
            IPipelineProfile <TRequest, TResponse> pipelineProfile)
        {
            var pipelineHandlers = pipelineProfile.RequestPipelineHandlers;

            foreach (var pipelineHandler in pipelineHandlers)
            {
                AddNextInner(() => pipelineHandler);
            }

            return(this);
        }
예제 #3
0
 /// <inheritdoc />
 public IPipelineProfile <TRequest, TResponse> AddOptionPipelineProfile(
     IPipelineProfile <TRequest, TResponse>?pipelineProfile)
 {
     return(pipelineProfile == null ? this : AddPipelineProfileInner(pipelineProfile));
 }