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