Пример #1
0
        public void WriteLine(string text, params object[] arg)
        {
            string formattedText = string.Format(text, arg);

            Session.AppendToLog(formattedText);
            _writer.WriteLine(formattedText);
        }
Пример #2
0
        public async Task <string> ReadLineAsync()
        {
            string text = await ConnectionChannel.ReadLineAsync();

            Session.AppendToLog(text);
            return(text);
        }
Пример #3
0
        public string ReadLine()
        {
            string text = ConnectionChannel.ReadLine();

            Session.AppendToLog(text);
            return(text);
        }
Пример #4
0
        protected async Task WriteLineAndFlushAsync(string text, params object[] arg)
        {
            string formattedText = string.Format(text, arg);

            Session.AppendToLog(formattedText);
            await ConnectionChannel.WriteLineAsync(formattedText);

            await ConnectionChannel.FlushAsync();
        }
Пример #5
0
        public string ReadLine()
        {
            string text = _reader.ReadLine();

            if (text == null)
            {
                throw new IOException("Client disconnected");
            }

            Session.AppendToLog(text);
            return(text);
        }