5 writes to _chars
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (5)
58_chars = _arrayToReturnToPool = ArrayPool<char>.Shared.Rent(GetDefaultLength(literalLength, formattedCount)); 71_chars = _arrayToReturnToPool = ArrayPool<char>.Shared.Rent(GetDefaultLength(literalLength, formattedCount)); 85_chars = initialBuffer; 131_chars = default; 659_chars = _arrayToReturnToPool = newArray;
29 references to _chars
System.Private.CoreLib (29)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (29)
35/// <summary>Array rented from the array pool and used to back <see cref="_chars"/>.</summary> 141public ReadOnlySpan<char> Text => _chars.Slice(0, _pos); 148if (value.TryCopyTo(_chars.Slice(_pos))) 270while (!Enum.TryFormatUnconstrained(value, _chars.Slice(_pos), out charsWritten)) 282while (!((ISpanFormattable)value).TryFormat(_chars.Slice(_pos), out charsWritten, default, _provider)) // constrained call avoiding boxing for value types 337while (!Enum.TryFormatUnconstrained(value, _chars.Slice(_pos), out charsWritten, format)) 349while (!((ISpanFormattable)value).TryFormat(_chars.Slice(_pos), out charsWritten, format, _provider)) // constrained call avoiding boxing for value types 407if (value.TryCopyTo(_chars.Slice(_pos))) 443value.CopyTo(_chars.Slice(_pos)); 445_chars.Slice(_pos, paddingRequired).Fill(' '); 450_chars.Slice(_pos, paddingRequired).Fill(' '); 452value.CopyTo(_chars.Slice(_pos)); 466value.TryCopyTo(_chars.Slice(_pos))) 492value.CopyTo(_chars.Slice(_pos)); 579_chars.Slice(_pos, paddingNeeded).Fill(' '); 583_chars.Slice(startingPos, charsWritten).CopyTo(_chars.Slice(startingPos + paddingNeeded)); 584_chars.Slice(startingPos, paddingNeeded).Fill(' '); 591/// <summary>Ensures <see cref="_chars"/> has the capacity to store <paramref name="additionalChars"/> beyond <see cref="_pos"/>.</summary> 595if (_chars.Length - _pos < additionalChars) 607value.CopyTo(_chars.Slice(_pos)); 617value.CopyTo(_chars.Slice(_pos)); 621/// <summary>Grows <see cref="_chars"/> to have the capacity to store at least <paramref name="additionalChars"/> beyond <see cref="_pos"/>.</summary> 629Debug.Assert(additionalChars > _chars.Length - _pos); 633/// <summary>Grows the size of <see cref="_chars"/>.</summary> 640GrowCore((uint)_chars.Length + 1); 643/// <summary>Grow the size of <see cref="_chars"/> to at least the specified <paramref name="requiredMinCapacity"/>.</summary> 652uint newCapacity = Math.Max(requiredMinCapacity, Math.Min((uint)_chars.Length * 2, string.MaxLength)); 656_chars.Slice(0, _pos).CopyTo(newArray);