5 writes to _contentBytesRemaining
System.Net.Http (5)
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (5)
20_contentBytesRemaining = contentLength; 45_contentBytesRemaining -= (ulong)bytesRead; 107_contentBytesRemaining -= (ulong)bytesRead; 166_contentBytesRemaining = 0; 188_contentBytesRemaining -= (ulong)bytesToConsume;
19 references to _contentBytesRemaining
System.Net.Http (19)
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (19)
31Debug.Assert(_contentBytesRemaining > 0); 32if ((ulong)buffer.Length > _contentBytesRemaining) 34buffer = buffer.Slice(0, (int)_contentBytesRemaining); 41throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _contentBytesRemaining)); 44Debug.Assert((ulong)bytesRead <= _contentBytesRemaining); 47if (_contentBytesRemaining == 0) 67Debug.Assert(_contentBytesRemaining > 0); 69if ((ulong)buffer.Length > _contentBytesRemaining) 71buffer = buffer.Slice(0, (int)_contentBytesRemaining); 103throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _contentBytesRemaining)); 106Debug.Assert((ulong)bytesRead <= _contentBytesRemaining); 109if (_contentBytesRemaining == 0) 134Task copyTask = _connection.CopyToContentLengthAsync(destination, async: true, _contentBytesRemaining, bufferSize, cancellationToken); 175Debug.Assert(_contentBytesRemaining > 0); 184int bytesToConsume = Math.Min(maxBytesToRead, (int)Math.Min((ulong)connectionBuffer.Length, _contentBytesRemaining)); 198Debug.Assert(_contentBytesRemaining > 0); 201if (_contentBytesRemaining == 0) 207if (_contentBytesRemaining > (ulong)maxDrainBytes) 233if (_contentBytesRemaining == 0)