public void Commit(int count) { if (count < 0) { ThrowHelper.ArgumentOutOfRange(nameof(count)); } _currentSpan = _currentSpan.Slice(count); _writtenBytesThisSpan += count; }
static void OutOfRange(int count, int capacity) => ThrowHelper.ArgumentOutOfRange(nameof(count), $"Advance called with count of {count}; write capacity is {capacity}");