예제 #1
0
        private void ProcessTransferOutEvent(ConsoleTransferEventStruct e)
        {
            using (_logger.CreateCallstack())
            {
                _logger.WriteLine("Len [{0}]", e.Len);

                if (StdOut == null)
                {
                    throw _logger.WriteException(new InvalidOperationException("Unexpected data"));
                }
                int len = (int)e.Len;
                if (len > 0)
                {
                    StdOut.WriteInternal(e.Data, 0, len);
                    _logger.WriteLine("Data written to the buffer");
                }
                else
                {
                    StdOut.CloseWrite();
                    _logger.WriteLine("Data buffer closed");
                }
            }
        }