6 writes to _buffer
Microsoft.AspNetCore.WebUtilities (6)
FileBufferingReadStream.cs (6)
83
_buffer
= new MemoryStream(_rentedBuffer);
88
_buffer
= new MemoryStream();
135
_buffer
= new MemoryStream(_rentedBuffer);
140
_buffer
= new MemoryStream();
279
_buffer
= CreateTempFile();
355
_buffer
= CreateTempFile();
27 references to _buffer
Microsoft.AspNetCore.WebUtilities (27)
FileBufferingReadStream.cs (27)
84
_buffer
.SetLength(0);
136
_buffer
.SetLength(0);
197
get { return
_buffer
.Length; }
203
get { return
_buffer
.Position; }
208
_buffer
.Position = value;
231
return
_buffer
.Seek(offset, origin);
261
if (
_buffer
.Position <
_buffer
.Length || _completelyBuffered)
264
return
_buffer
.Read(buffer);
269
if (_bufferLimit.HasValue && _bufferLimit - read <
_buffer
.Length)
275
if (_inMemory && _memoryThreshold - read <
_buffer
.Length)
278
var oldBuffer =
_buffer
;
290
_buffer
.Write(rentedBuffer.AsSpan(0, copyRead));
301
_buffer
.Write(_rentedBuffer.AsSpan(0, (int)oldBuffer.Length));
309
_buffer
.Write(buffer.Slice(0, read));
338
if (
_buffer
.Position <
_buffer
.Length || _completelyBuffered)
341
return await
_buffer
.ReadAsync(buffer, cancellationToken);
346
if (_bufferLimit.HasValue && _bufferLimit - read <
_buffer
.Length)
351
if (_inMemory && _memoryThreshold - read <
_buffer
.Length)
354
var oldBuffer =
_buffer
;
366
await
_buffer
.WriteAsync(rentedBuffer.AsMemory(0, copyRead), cancellationToken);
377
await
_buffer
.WriteAsync(_rentedBuffer.AsMemory(0, (int)oldBuffer.Length), cancellationToken);
385
await
_buffer
.WriteAsync(buffer.Slice(0, read), cancellationToken);
437
return
_buffer
.CopyToAsync(destination, bufferSize, cancellationToken);
478
_buffer
.Dispose();
494
await
_buffer
.DisposeAsync();