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)
31
Debug.Assert(
_contentBytesRemaining
> 0);
32
if ((ulong)buffer.Length >
_contentBytesRemaining
)
34
buffer = buffer.Slice(0, (int)
_contentBytesRemaining
);
41
throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount,
_contentBytesRemaining
));
44
Debug.Assert((ulong)bytesRead <=
_contentBytesRemaining
);
47
if (
_contentBytesRemaining
== 0)
67
Debug.Assert(
_contentBytesRemaining
> 0);
69
if ((ulong)buffer.Length >
_contentBytesRemaining
)
71
buffer = buffer.Slice(0, (int)
_contentBytesRemaining
);
103
throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount,
_contentBytesRemaining
));
106
Debug.Assert((ulong)bytesRead <=
_contentBytesRemaining
);
109
if (
_contentBytesRemaining
== 0)
134
Task copyTask = _connection.CopyToContentLengthAsync(destination, async: true,
_contentBytesRemaining
, bufferSize, cancellationToken);
175
Debug.Assert(
_contentBytesRemaining
> 0);
184
int bytesToConsume = Math.Min(maxBytesToRead, (int)Math.Min((ulong)connectionBuffer.Length,
_contentBytesRemaining
));
198
Debug.Assert(
_contentBytesRemaining
> 0);
201
if (
_contentBytesRemaining
== 0)
207
if (
_contentBytesRemaining
> (ulong)maxDrainBytes)
233
if (
_contentBytesRemaining
== 0)