// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IControllerActivator controllerActivator, IActionActivator actionActivator, IConfiguration configuration) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); //app.UseHsts(); } DataGateORM.Connect(configuration.GetConnectionString("postgres")); TableRegistry(); app.UseSession(); _routeHelper = new RouteHelper(controllerActivator, actionActivator); var routeBuilder = new RouteBuilder(app); _routeHelper.Initialize(routeBuilder); app.UseStaticFiles(); app.UseStatusCodePagesWithReExecute("/Error/{0}"); app.UseRouter(routeBuilder.Build()); }
public ActionActivatorTest() { _fixture = new Fixture(); _activator = new ActionActivator(); _thing = new Thing(); _service = Substitute.For <IServiceProvider>(); }
public RouteHelper(IControllerActivator controllerActivator, IActionActivator actionActivator) { _controllerActivator = controllerActivator; _actionActivator = actionActivator; _actionDictionary = new Dictionary <string, Dictionary <string, List <ActionEntity> > >(); }
public RequestAction(ITargetBlock <Action> target, IActionActivator activator, IServiceProvider provider) { _target = target; _activator = activator; _provider = provider; }