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}"); }
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)); } }
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()}"); }