protected void CheckForBufferOverflow() { if (maxLines >= 1 && previousLines.Count == maxLines) { BufferFull?.Invoke(previousLines); previousLines.Clear(); } }
protected void CheckForBufferOverflow() { if (maxLines < 1) { return; } while (contents.Count > maxLines) { var fullBuffer = contents.GetRange(0, maxLines); contents = contents.GetRange(maxLines, contents.Count - maxLines); BufferFull?.Invoke(fullBuffer); } }
//Invoke Buffer Full event that is handled within Process class protected virtual void OnBufferFull(BufferFullEventArgs e) { BufferFull?.Invoke(this, e); }