4 writes to _totalLength
System.Net.Http (4)
System\Net\Http\HttpContent.cs (4)
915
_totalLength
+= buffer.Length;
973
_totalLength
+= buffer.Length;
988
_totalLength
= _lastBufferOffset = buffer.Length;
995
_totalLength
+= buffer.Length;
19 references to _totalLength
System.Net.Http (19)
System\Net\Http\HttpContent.cs (19)
795
/// <summary><see cref="
_totalLength
"/> may not exceed this limit, or we'll throw a <see cref="CreateOverCapacityException"/>.</summary>
797
/// <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>
845
if (!_lastBufferIsPooled &&
_totalLength
== _lastBuffer.Length)
851
if (
_totalLength
== 0)
856
byte[] buffer = new byte[
_totalLength
];
874
: _lastBuffer.AsSpan(0,
_totalLength
);
881
Debug.Assert(_lastBufferOffset ==
_totalLength
);
884
return _lastBuffer.AsSpan(0,
_totalLength
).ToArray();
893
byte[] newBuffer = new byte[
_totalLength
];
903
if (_maxBufferSize -
_totalLength
< buffer.Length)
925
Debug.Assert(
_totalLength
+ buffer.Length <= _maxBufferSize);
933
newBufferCapacity = Math.Max(newBufferCapacity,
_totalLength
+ buffer.Length);
947
int currentTotalCapacity =
_totalLength
- _lastBufferOffset + lastBufferCapacity;
965
newBuffer = new byte[
_totalLength
+ buffer.Length <= _expectedFinalSize ? _expectedFinalSize : newTotalCapacity];
971
buffer.CopyTo(newBuffer.AsSpan(
_totalLength
));
974
_lastBufferOffset =
_totalLength
;
982
Debug.Assert(
_totalLength
== 0);
1042
Debug.Assert(destination.Length >=
_totalLength
);
1127
public override long Length =>
_totalLength
;