12 writes to _pos
Microsoft.AspNetCore.WebSockets (12)
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (12)
22_pos = 0; 29_pos = 0; 39_pos = value; 145_pos += count; 165_pos += count; 175_pos = pos + 1; 195_pos = pos + 1; 212_pos += s.Length; 227_pos += count; 243_pos += length; 255_pos += value.Length; 267_pos = origPos + length;
27 references to _pos
Microsoft.AspNetCore.WebSockets (27)
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (27)
34get => _pos; 53Grow(capacity - _pos); 86Debug.Assert(index < _pos); 93string s = _chars.Slice(0, _pos).ToString(); 112return _chars.Slice(0, _pos); 115public ReadOnlySpan<char> AsSpan() => _chars.Slice(0, _pos); 116public ReadOnlySpan<char> AsSpan(int start) => _chars.Slice(start, _pos - start); 121if (_chars.Slice(0, _pos).TryCopyTo(destination)) 123charsWritten = _pos; 137if (_pos > _chars.Length - count) 142int remaining = _pos - index; 157if (_pos > (_chars.Length - count)) 162int remaining = _pos - index; 171int pos = _pos; 191int pos = _pos; 205int pos = _pos; 217if (_pos > _chars.Length - count) 222Span<char> dst = _chars.Slice(_pos, count); 232int pos = _pos; 238Span<char> dst = _chars.Slice(_pos, length); 248int pos = _pos; 254value.CopyTo(_chars.Slice(_pos)); 261int origPos = _pos; 281/// <see cref="_pos"/> whichever is greater. 290Debug.Assert(_pos > _chars.Length - additionalCapacityBeyondPos, "Grow called incorrectly, no resize is needed."); 293char[] poolArray = ArrayPool<char>.Shared.Rent((int)Math.Max((uint)(_pos + additionalCapacityBeyondPos), (uint)_chars.Length * 2)); 295_chars.Slice(0, _pos).CopyTo(poolArray);