Ejemplo n.º 1
0
        void Application_Start(object sender, EventArgs e)
        {
            // Code qui s’exécute au démarrage de l’application
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);


            ServerTimer timer = new ServerTimer(TimeSpan.FromSeconds(15), true);

            timer.BeginTimer();
            timer.StopTask();
            Application["ServerTimer"] = timer;
        }