4 writes to _totalLength
System.Net.Http (4)
System\Net\Http\HttpContent.cs (4)
913_totalLength += buffer.Length; 971_totalLength += buffer.Length; 986_totalLength = _lastBufferOffset = buffer.Length; 993_totalLength += buffer.Length;
19 references to _totalLength
System.Net.Http (19)
System\Net\Http\HttpContent.cs (19)
793/// <summary><see cref="_totalLength"/> may not exceed this limit, or we'll throw a <see cref="CreateOverCapacityException"/>.</summary> 795/// <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> 843if (!_lastBufferIsPooled && _totalLength == _lastBuffer.Length) 849if (_totalLength == 0) 854byte[] buffer = new byte[_totalLength]; 872: _lastBuffer.AsSpan(0, _totalLength); 879Debug.Assert(_lastBufferOffset == _totalLength); 882return _lastBuffer.AsSpan(0, _totalLength).ToArray(); 891byte[] newBuffer = new byte[_totalLength]; 901if (_maxBufferSize - _totalLength < buffer.Length) 923Debug.Assert(_totalLength + buffer.Length <= _maxBufferSize); 931newBufferCapacity = Math.Max(newBufferCapacity, _totalLength + buffer.Length); 945int currentTotalCapacity = _totalLength - _lastBufferOffset + lastBufferCapacity; 963newBuffer = new byte[_totalLength + buffer.Length <= _expectedFinalSize ? _expectedFinalSize : newTotalCapacity]; 969buffer.CopyTo(newBuffer.AsSpan(_totalLength)); 972_lastBufferOffset = _totalLength; 980Debug.Assert(_totalLength == 0); 1040Debug.Assert(destination.Length >= _totalLength); 1125public override long Length => _totalLength;