public IslandRouterController(IslandRouterService islandRouterService) { _islandRouterService = islandRouterService; }
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime lifetime, IslandRouterService islandRouterService) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } lifetime.ApplicationStarted.Register(() => { app.ApplicationServices.GetService <ActorSystem>(); }); lifetime.ApplicationStopping.Register(() => { app.ApplicationServices.GetService <ActorSystem>().Terminate().Wait(); }); app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), // specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Island router API"); c.RoutePrefix = string.Empty; }); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }