示例#1
0
        private void WaitForStop()
        {
            bool stop = false;

            while (!stop)
            {
                var input = Console.ReadLine();
                stop = _utils.IsExitMessage(input);
                if (stop)
                {
                    Stop();
                }
            }
        }
示例#2
0
 private Task ReadConsoleAndSendHandler()
 {
     return(Task.Run(() =>
     {
         var input = "";
         while (!_utils.IsExitMessage(input))
         {
             input = Console.ReadLine();
             SendMessage(input);
         }
         return;
     }));
 }