Exemple #1
0
        public void Configuration(IAppBuilder app)
        {
            var httpConfig = new HttpConfiguration();

            httpConfig.MapHttpAttributeRoutes();
            httpConfig.ConfigureSwagger();
            httpConfig.ConfigureCors();
            httpConfig.ConfigureRoutes();
            httpConfig.ConfigureDependencyResolution();
            app.UseWebApi(httpConfig);

            var container = new Container();

            app.ConfigureDependencyResolution(container);
            app.UseCors(CorsOptions.AllowAll);
            app.MapSignalR(new HubConfiguration
            {
                Resolver = new SignalRSimpleInjectorDependencyResolver(container)
            });
            app.RunSignalR();
        }