protected override void DoWork()
 {
     for (;;)
     {
         StartStopEvent.WaitOne();
         Thread.Sleep(EllapsedTime);
         GenerateSmsMessages();
     }
 }
示例#2
0
        protected override async void DoWork()
        {
            for (;;)
            {
                StartStopEvent.WaitOne();
                await Task.Delay(EllapsedTime);

                GenerateSmsMessages();
            }
        }