4 writes to _totalLength
System.Net.Http (4)
System\Net\Http\HttpContent.cs (4)
916
_totalLength
+= buffer.Length;
974
_totalLength
+= buffer.Length;
989
_totalLength
= _lastBufferOffset = buffer.Length;
996
_totalLength
+= buffer.Length;
19 references to _totalLength
System.Net.Http (19)
System\Net\Http\HttpContent.cs (19)
796
/// <summary><see cref="
_totalLength
"/> may not exceed this limit, or we'll throw a <see cref="CreateOverCapacityException"/>.</summary>
798
/// <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>
846
if (!_lastBufferIsPooled &&
_totalLength
== _lastBuffer.Length)
852
if (
_totalLength
== 0)
857
byte[] buffer = new byte[
_totalLength
];
875
: _lastBuffer.AsSpan(0,
_totalLength
);
882
Debug.Assert(_lastBufferOffset ==
_totalLength
);
885
return _lastBuffer.AsSpan(0,
_totalLength
).ToArray();
894
byte[] newBuffer = new byte[
_totalLength
];
904
if (_maxBufferSize -
_totalLength
< buffer.Length)
926
Debug.Assert(
_totalLength
+ buffer.Length <= _maxBufferSize);
934
newBufferCapacity = Math.Max(newBufferCapacity,
_totalLength
+ buffer.Length);
948
int currentTotalCapacity =
_totalLength
- _lastBufferOffset + lastBufferCapacity;
966
newBuffer = new byte[
_totalLength
+ buffer.Length <= _expectedFinalSize ? _expectedFinalSize : newTotalCapacity];
972
buffer.CopyTo(newBuffer.AsSpan(
_totalLength
));
975
_lastBufferOffset =
_totalLength
;
983
Debug.Assert(
_totalLength
== 0);
1043
Debug.Assert(destination.Length >=
_totalLength
);
1128
public override long Length =>
_totalLength
;