// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IImageManager imageManager, ISlideshowHandler slideshowHandler) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMvc(routes => { routes .MapRoute( // Special route to load different versions of images name: "image", template: "image/{version}/{id}", defaults: new { controller = "Image", action = "Load" }) .MapRoute( // Default route mapped to controller and action name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "PartyWifi API v1"); }); imageManager.Initialize(); slideshowHandler.Initialize(); }
public SlideshowController(ISlideshowHandler slideshowHandler, IImageManager imageManager) { _slideshowHandler = slideshowHandler; _imageManager = imageManager; }
public AdminController(ISlideshowHandler slideshowHandler) { _slideshowHandler = slideshowHandler; }