Exemplo n.º 1
0
        private void WhenIUseAGeneric()
        {
            var provider = _services.BuildServiceProvider();
            IOcelotPipelineBuilder builder = new OcelotPipelineBuilder(provider);

            builder = builder.UseMiddleware <Ocelot.Errors.Middleware.ExceptionHandlerMiddleware>();
            var del = builder.Build();

            _downstreamContext = new DownstreamContext(new DefaultHttpContext());
            del.Invoke(_downstreamContext);
        }
Exemplo n.º 2
0
        public void Middleware_Multi_Parameters_Invoke()
        {
            var provider = _services.BuildServiceProvider();
            IOcelotPipelineBuilder builder = new OcelotPipelineBuilder(provider);

            builder = builder.UseMiddleware <MultiParametersInvokeMiddleware>();
            var del = builder.Build();

            _downstreamContext = new DownstreamContext(new DefaultHttpContext());
            del.Invoke(_downstreamContext);
        }