Lines Matching refs:buffer
82 protected static void ValidateBufferArgs(byte[] buffer, int offset, int length) in ValidateBufferArgs() argument
84 if (buffer == null) in ValidateBufferArgs()
86 throw new ArgumentNullException(nameof(buffer)); in ValidateBufferArgs()
100 if (offset + length > buffer.Length) in ValidateBufferArgs()
102 throw new ArgumentOutOfRangeException(nameof(buffer), "Not enough data"); in ValidateBufferArgs()
108 …public abstract ValueTask<int> ReadAsync(byte[] buffer, int offset, int length, CancellationToken … in ReadAsync() argument
110 …public virtual async ValueTask<int> ReadAllAsync(byte[] buffer, int offset, int length, Cancellati… in ReadAllAsync() argument
114 ValidateBufferArgs(buffer, offset, length); in ReadAllAsync()
122 buffer[offset++] = _peekBuffer[0]; in ReadAllAsync()
135 var numBytes = await ReadAsync(buffer, offset, remaining, cancellationToken); in ReadAllAsync()
153 public virtual async Task WriteAsync(byte[] buffer, CancellationToken cancellationToken) in WriteAsync() argument
155 await WriteAsync(buffer, 0, buffer.Length, CancellationToken.None); in WriteAsync()
158 public virtual async Task WriteAsync(byte[] buffer, int offset, int length) in WriteAsync() argument
160 await WriteAsync(buffer, offset, length, CancellationToken.None); in WriteAsync()
163 …public abstract Task WriteAsync(byte[] buffer, int offset, int length, CancellationToken cancellat… in WriteAsync() argument