Esempio n. 1
0
        public async Task ListenInputForSend()
        {
            await renderLock.WaitAsync();

            try
            {
                Console.ForegroundColor = ConsoleColor.DarkGreen;
                Console.WriteLine($"Please enter will send message , end with <Enter>.");
                string input = Console.ReadLine();
                _chatUnit.RemoveLastRow(3);
                _chatSocket.SendMessage($"{_chator.ChatorId} {_chator.ChatorName} {input}");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            finally
            {
                _chatUnit.ResetConsole();
                renderLock.Release();
            }
        }