protected override void BaseAction(Action <TextWriter> action) { var sb = new StringBuilder(); using (var stringWriter = new StringWriter(sb)) { TimeStamp(stringWriter); action(stringWriter); } BaseTextWriter.Write(sb); }
private void ProcessCurrentLine() { // update maximum line length if necessary if (MaximumLineLength < _currentLine.Length) { MaximumLineLength = _currentLine.Length; } // complete line found -> check if it should be passed to base text writer or not if (_lineFilter(_currentLine)) { BaseTextWriter.Write(_currentLine.ToString()); } // reset current line _currentLine.Length = 0; }