示例#1
0
        public void StartWatching()
        {
            ClientFacade facade = new ClientFacade();
            List<Submit> submits = facade.GetUnprocessedSubmits();

            //start watching new submits
            StartNewSubmits(submits);

            //set the timer to start periodically watching
            _timer = new System.Timers.Timer();
            _timer.Interval = GetPollingInterval();
            _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);
            _timer.Start();
        }
示例#2
0
 private void _timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     ClientFacade facade = new ClientFacade();
     List<Submit> submits = facade.GetUnprocessedSubmits();
     StartNewSubmits(submits);
     TerminateOldSubmits();
     TraceStatus();
 }