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>
141
public ReadOnlySpan<char> Text =>
_chars
.Slice(0, _pos);
148
if (value.TryCopyTo(
_chars
.Slice(_pos)))
270
while (!Enum.TryFormatUnconstrained(value,
_chars
.Slice(_pos), out charsWritten))
282
while (!((ISpanFormattable)value).TryFormat(
_chars
.Slice(_pos), out charsWritten, default, _provider)) // constrained call avoiding boxing for value types
337
while (!Enum.TryFormatUnconstrained(value,
_chars
.Slice(_pos), out charsWritten, format))
349
while (!((ISpanFormattable)value).TryFormat(
_chars
.Slice(_pos), out charsWritten, format, _provider)) // constrained call avoiding boxing for value types
407
if (value.TryCopyTo(
_chars
.Slice(_pos)))
443
value.CopyTo(
_chars
.Slice(_pos));
445
_chars
.Slice(_pos, paddingRequired).Fill(' ');
450
_chars
.Slice(_pos, paddingRequired).Fill(' ');
452
value.CopyTo(
_chars
.Slice(_pos));
466
value.TryCopyTo(
_chars
.Slice(_pos)))
492
value.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>
595
if (
_chars
.Length - _pos < additionalChars)
607
value.CopyTo(
_chars
.Slice(_pos));
617
value.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>
629
Debug.Assert(additionalChars >
_chars
.Length - _pos);
633
/// <summary>Grows the size of <see cref="
_chars
"/>.</summary>
640
GrowCore((uint)
_chars
.Length + 1);
643
/// <summary>Grow the size of <see cref="
_chars
"/> to at least the specified <paramref name="requiredMinCapacity"/>.</summary>
652
uint newCapacity = Math.Max(requiredMinCapacity, Math.Min((uint)
_chars
.Length * 2, string.MaxLength));
656
_chars
.Slice(0, _pos).CopyTo(newArray);