public static (Pipeline <TIn, TOut>, bool) TryGetPipeline <TIn, TOut>( this PipelineInstructions <TIn, TOut> instructions, IServiceProvider sp) { if (!instructions.Validate()) { return(null, false); } var middleware = BuildMiddleware(instructions, sp); var pipeline = new Pipeline <TIn, TOut>( instructions.ParseModel, instructions.ParseResponse, middleware); return(pipeline, true); }
public static Middleware <TOut> BuildMiddleware <TIn, TOut>( this PipelineInstructions <TIn, TOut> instructions, IServiceProvider sp) => BuildMiddleware(instructions.MiddlewareFunction, sp);
public static (Pipeline <NoType, TOut>, bool) TryGetPipeline <TOut>( this PipelineInstructions <TOut> instructions, IServiceProvider sp) => instructions.TryGetPipeline <NoType, TOut>(sp);