public override IPipelineFactory <TRequest, TResponse> OutputTo( Process <TNextRequest, TNextResponse> process ) { if (process == null) { throw new ArgumentNullException(nameof(process)); } return(new FunctionProcessPipeline <TRequest, TSegmentRequest, TSegmentResponse, TResponse>( Segments.Connect(_middleware, process), _tail )); }
public override Process <TRequest, TResponse> BuildPipeline( ServiceFactory factory, Process <TNextRequest, TNextResponse> nextProcess ) { if (factory == null) { throw new ArgumentNullException(nameof(factory)); } if (nextProcess == null) { throw new ArgumentNullException(nameof(nextProcess)); } return(Segments.Connect( Resolver.ResolveSegment <TService, TRequest, TNextRequest, TNextResponse, TResponse>(factory), nextProcess )); }
public override Process <TRequest, TResponse> BuildPipeline( ServiceFactory factory, Process <TNextRequest, TNextResponse> nextProcess ) => _tail.BuildPipeline(factory, Segments.Connect(_middleware, nextProcess));