コード例 #1
0
        public void WriteLine(string message, Flair flair = null, string displayAreaName = DEFAULT_DISPLAY_AREA)
        {
            Dwl($"start request to write {message}");
            VerifyDisplayAreas(displayAreaName);

            var writePosition = DeriveWritePosition(displayAreaName, message);

            _queuedWriter.WriteMessage(writePosition, message, flair ?? DefaultFlair);

            Dwl($"end request to write {message}");
        }
コード例 #2
0
 public void WriteMessage(Position writePosition, string message, Flair flair)
 {
     Dwl($"start queue for write {message}");
     if (_acceptNewItems == false)
     {
         Dwl($"ignored request to write {message}");
         return;
     }
     lock (_groupLock)
     {
         _queuedMessages.Enqueue(new ConsoleMessage(message, flair, writePosition));
     }
 }
コード例 #3
0
        public void WriteLines(List <string> groupMessages, Flair flair = null, string displayAreaName = DEFAULT_DISPLAY_AREA)
        {
            Dwl($"start request to write {groupMessages.ToNewLineList()}");
            VerifyDisplayAreas(displayAreaName);

            var consoleMessages = groupMessages
                                  .Select(msg =>
                                          new ConsoleMessage(msg, flair ?? DefaultFlair, DeriveWritePosition(displayAreaName, msg)))
                                  .ToList();

            _queuedWriter.WriteMessages(consoleMessages);

            Dwl($"start request to write {groupMessages.ToNewLineList()}");
        }