4 writes to _totalLength
System.Net.Http (4)
System\Net\Http\HttpContent.cs (4)
925
_totalLength
+= buffer.Length;
983
_totalLength
+= buffer.Length;
998
_totalLength
= _lastBufferOffset = buffer.Length;
1005
_totalLength
+= buffer.Length;
19 references to _totalLength
System.Net.Http (19)
System\Net\Http\HttpContent.cs (19)
805
/// <summary><see cref="
_totalLength
"/> may not exceed this limit, or we'll throw a <see cref="CreateOverCapacityException"/>.</summary>
807
/// <summary>The value of the Content-Length header or 0. <see cref="
_totalLength
"/> may exceed this value if the Content-Length isn't being enforced by the content.</summary>
855
if (!_lastBufferIsPooled &&
_totalLength
== _lastBuffer.Length)
861
if (
_totalLength
== 0)
866
byte[] buffer = new byte[
_totalLength
];
884
: _lastBuffer.AsSpan(0,
_totalLength
);
891
Debug.Assert(_lastBufferOffset ==
_totalLength
);
894
return _lastBuffer.AsSpan(0,
_totalLength
).ToArray();
903
byte[] newBuffer = new byte[
_totalLength
];
913
if (_maxBufferSize -
_totalLength
< buffer.Length)
935
Debug.Assert(
_totalLength
+ buffer.Length <= _maxBufferSize);
943
newBufferCapacity = Math.Max(newBufferCapacity,
_totalLength
+ buffer.Length);
957
int currentTotalCapacity =
_totalLength
- _lastBufferOffset + lastBufferCapacity;
975
newBuffer = new byte[
_totalLength
+ buffer.Length <= _expectedFinalSize ? _expectedFinalSize : newTotalCapacity];
981
buffer.CopyTo(newBuffer.AsSpan(
_totalLength
));
984
_lastBufferOffset =
_totalLength
;
992
Debug.Assert(
_totalLength
== 0);
1052
Debug.Assert(destination.Length >=
_totalLength
);
1147
public override long Length =>
_totalLength
;