public void Configuration(IAppBuilder app) { var config = ConfigureWebApi(); config.Services.Add(typeof(IExceptionLogger), new SerilogExceptionLogger()); var hubConfig = new HubConfiguration(); var container = ConfigureContainer(hubConfig); config.DependencyResolver = new AutofacWebApiDependencyResolver(container); app.UseAutofacMiddleware(container); app.UseAutofacWebApi(config); app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll); // This must be done prior to calling IAppBuilder.UseWebApi app.UseWebApi(config); hubConfig.Resolver = new AutofacDependencyResolver(container); app.MapSignalR("/signalr", hubConfig); ConfigureStaticFiles(app, container.Resolve <IAppSettings>()); _hubTicker = container.Resolve <IHubTicker>(); }
public HubController(IHubTicker hubTicker) { _hubTicker = hubTicker; }