Ejemplo n.º 1
0
 public void Start(StartParameters parameters = null)
 {
     //TODO 5: Nameof Operator. Rename refactoring, the string changes too.
     Log($"--- Entering the Start method. The value of Delay is {parameters?.Delay}---");
     OnStart(EventArgs.Empty);
     ThreadPool.QueueUserWorkItem(ReadInput);
     _sw.Start();
     while (true)
     {
         if (Quit)
         {
             break;
         }
         OnTick(EventArgs.Empty);
         Thread.Sleep(100);
         _ev.WaitOne();
     }
     ;
     Log($"--- Exiting the {nameof(Start)} method.---");
 }
Ejemplo n.º 2
0
 public void Start(StartParameters parameters = null)
 {
     //TODO 5: Nameof Operator. Rename refactoring, the string changes too.
     Log($"--- Entering the Start method. The value of Delay is {parameters?.Delay}---");
     OnStart(EventArgs.Empty);
     ThreadPool.QueueUserWorkItem(ReadInput);
     _sw.Start();
     while (true)
     {
         if (Quit) break;
         OnTick(EventArgs.Empty);
         Thread.Sleep(100);
         _ev.WaitOne();
     };
     Log($"--- Exiting the {nameof(Start)} method.---");
 }