Use <TExpectedRequest, TExpectedResponse>( Segment <TNextRequest, TExpectedRequest, TExpectedResponse, TNextResponse> segment ) { if (segment == null) { throw new ArgumentNullException(nameof(segment)); } return(new FunctionSegment <TRequest, TSegmentRequest, TExpectedRequest, TExpectedResponse, TSegmentResponse, TResponse>( Segments.Compose(_middleware, segment), Resolver.Next(), _tail )); }
public override IPipelineBuilder <TRequest, TNextRequest, TNextResponse, TResponse> Use( Segment <TNextRequest, TNextResponse> segment ) { if (segment == null) { throw new ArgumentNullException(nameof(segment)); } return(new FunctionSegment <TRequest, TSegmentRequest, TNextRequest, TNextResponse, TSegmentResponse, TResponse>( Segments.Compose(_middleware, segment), Resolver.Next(), _tail )); }