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