4 writes to _totalLength
System.Net.Http (4)
System\Net\Http\HttpContent.cs (4)
928_totalLength += buffer.Length; 986_totalLength += buffer.Length; 1001_totalLength = _lastBufferOffset = buffer.Length; 1008_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> 858if (!_lastBufferIsPooled && _totalLength == _lastBuffer.Length) 864if (_totalLength == 0) 869byte[] buffer = new byte[_totalLength]; 887: _lastBuffer.AsSpan(0, _totalLength); 894Debug.Assert(_lastBufferOffset == _totalLength); 897return _lastBuffer.AsSpan(0, _totalLength).ToArray(); 906byte[] newBuffer = new byte[_totalLength]; 916if (_maxBufferSize - _totalLength < buffer.Length) 938Debug.Assert(_totalLength + buffer.Length <= _maxBufferSize); 946newBufferCapacity = Math.Max(newBufferCapacity, _totalLength + buffer.Length); 960int currentTotalCapacity = _totalLength - _lastBufferOffset + lastBufferCapacity; 978newBuffer = new byte[_totalLength + buffer.Length <= _expectedFinalSize ? _expectedFinalSize : newTotalCapacity]; 984buffer.CopyTo(newBuffer.AsSpan(_totalLength)); 987_lastBufferOffset = _totalLength; 995Debug.Assert(_totalLength == 0); 1055Debug.Assert(destination.Length >= _totalLength); 1150public override long Length => _totalLength;