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