コード例 #1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            NinjectModule Module        = new ViewModule();
            NinjectModule serviceModule = new ServiceModule("DefaultConnection");
            var           kernel        = new StandardKernel(serviceModule, Module);

            DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel));
        }
コード例 #2
0
ファイル: Global.asax.cs プロジェクト: rupbgroup1/repoTest
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            //===Once a week
            timer.Interval = 650000000;
            timer.Elapsed += tm_Tick;
            path           = Server.MapPath("/");
        }
コード例 #3
0
ファイル: Global.asax.cs プロジェクト: nadj851/ProFinal
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);



            System.Timers.Timer aTimer = new System.Timers.Timer();
            aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
            aTimer.Interval = 300000;
            //aTimer.Interval = 60000;
            aTimer.Enabled = true;
        }
コード例 #4
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            var builder             = new ContainerBuilder();
            var controllersAssembly = Assembly.GetAssembly(typeof(HomeController));

            builder.RegisterInstance(new DataStoreHelper()).AsSelf();
            builder.RegisterControllers(controllersAssembly);
            // builder.Build();
            //   builder.RegisterModule(new PerRequestModule());

            var containerBuilder = builder.Build();

            DependencyResolver.SetResolver(new AutofacDependencyResolver(containerBuilder));
        }
コード例 #5
0
 void Application_Start(object sender, EventArgs e)
 {
     // Code qui s’exécute au démarrage de l’application
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }
コード例 #6
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }