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> 855if (!_lastBufferIsPooled && _totalLength == _lastBuffer.Length) 861if (_totalLength == 0) 866byte[] buffer = new byte[_totalLength]; 884: _lastBuffer.AsSpan(0, _totalLength); 891Debug.Assert(_lastBufferOffset == _totalLength); 894return _lastBuffer.AsSpan(0, _totalLength).ToArray(); 903byte[] newBuffer = new byte[_totalLength]; 913if (_maxBufferSize - _totalLength < buffer.Length) 935Debug.Assert(_totalLength + buffer.Length <= _maxBufferSize); 943newBufferCapacity = Math.Max(newBufferCapacity, _totalLength + buffer.Length); 957int currentTotalCapacity = _totalLength - _lastBufferOffset + lastBufferCapacity; 975newBuffer = new byte[_totalLength + buffer.Length <= _expectedFinalSize ? _expectedFinalSize : newTotalCapacity]; 981buffer.CopyTo(newBuffer.AsSpan(_totalLength)); 984_lastBufferOffset = _totalLength; 992Debug.Assert(_totalLength == 0); 1052Debug.Assert(destination.Length >= _totalLength); 1147public override long Length => _totalLength;