Register() public static method

public static Register ( ) : void
return void
Ejemplo n.º 1
0
        public async Task ConfigureAsync(IAppBuilder app)
        {
            GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings = JsonHelper.GetJsonSerializerSettings();

            app.Map
            (
                "/signalr",
                map =>
            {
                map.UseCors(CorsOptions.AllowAll);

                var configuration = new HubConfiguration
                {
                    EnableJavaScriptProxies = true
                };

                map.RunSignalR(configuration);
                var module = new AuthorizeModule(null, null);
                GlobalHost.HubPipeline.AddModule(module);
            });


            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new FrapidRazorViewEngine());
            LogManager.InternalizeLogger();
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            AssetConfig.Register();
            await StartupRegistration.RegisterAsync().ConfigureAwait(false);

            BackupRegistration.Register();
            EodTaskRegistration.Register();
            AccountConfig.Register(app);
        }
Ejemplo n.º 2
0
        public void Configuration(IAppBuilder app)
        {
            app.Map
            (
                "/signalr",
                map =>
            {
                map.UseCors(CorsOptions.AllowAll);

                var configuration = new HubConfiguration
                {
                    EnableJavaScriptProxies = true
                };

                map.RunSignalR(configuration);
                var module = new AuthorizeModule(null, null);
                GlobalHost.HubPipeline.AddModule(module);
            });

            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new FrapidRazorViewEngine());

            LogManager.InternalizeLogger();
            AreaRegistration.RegisterAllAreas();
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            AssetConfig.Register();
            StartupRegistration.RegisterAsync().Wait();
            BackupRegistration.Register();
            EodTaskRegistration.Register();
            AccountConfig.Register(app);
        }