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> 845if (!_lastBufferIsPooled && _totalLength == _lastBuffer.Length) 851if (_totalLength == 0) 856byte[] buffer = new byte[_totalLength]; 874: _lastBuffer.AsSpan(0, _totalLength); 881Debug.Assert(_lastBufferOffset == _totalLength); 884return _lastBuffer.AsSpan(0, _totalLength).ToArray(); 893byte[] newBuffer = new byte[_totalLength]; 903if (_maxBufferSize - _totalLength < buffer.Length) 925Debug.Assert(_totalLength + buffer.Length <= _maxBufferSize); 933newBufferCapacity = Math.Max(newBufferCapacity, _totalLength + buffer.Length); 947int currentTotalCapacity = _totalLength - _lastBufferOffset + lastBufferCapacity; 965newBuffer = new byte[_totalLength + buffer.Length <= _expectedFinalSize ? _expectedFinalSize : newTotalCapacity]; 971buffer.CopyTo(newBuffer.AsSpan(_totalLength)); 974_lastBufferOffset = _totalLength; 982Debug.Assert(_totalLength == 0); 1042Debug.Assert(destination.Length >= _totalLength); 1127public override long Length => _totalLength;