public void Configuration(IAppBuilder app) { app.UseCors(CorsOptions.AllowAll); var hubConfiguration = new HubConfiguration(); hubConfiguration.EnableDetailedErrors = true; app.MapSignalR(hubConfiguration); PerformanceEngine performanceEngine = new PerformanceEngine(800); Task.Factory.StartNew(async() => await performanceEngine.OnPerformanceMonitor()); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app) { app.UseIISPlatformHandler(); app.UseWebSockets(); app.UseSignalR(); app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); var cm = app.ApplicationServices.GetService <IConnectionManager>(); var performanceEngine = new PerformanceEngine(800, cm); Task.Factory.StartNew(async() => await performanceEngine.OnPerformanceMonitor()); }