private void OnNextConsoleOut(CharactersOut c, IObserver <CharactersOut> observer) { lock (_copyLock) { if (Flushing) { OnNextFlush(c, observer); } else { OnNextSource(c, observer); } } }
private static void OnNextFlush(CharactersOut c, IObserver <CharactersOut> observer) => observer.OnNext(c.Error ? ConsoleOut.ErrorOut(c.Characters) : ConsoleOut.Out(c.Characters));