private void WaitForStop() { bool stop = false; while (!stop) { var input = Console.ReadLine(); stop = _utils.IsExitMessage(input); if (stop) { Stop(); } } }
private Task ReadConsoleAndSendHandler() { return(Task.Run(() => { var input = ""; while (!_utils.IsExitMessage(input)) { input = Console.ReadLine(); SendMessage(input); } return; })); }