2 writes to _stack
System.Text.Json (2)
System\Text\Json\Serialization\WriteStack.cs (2)
130
_stack
= new WriteStackFrame[4];
134
Array.Resize(ref
_stack
, 2 * _stack.Length);
23 references to _stack
System.Text.Json (23)
System\Text\Json\Serialization\WriteStack.cs (23)
35
Debug.Assert(
_stack
is not null);
36
return ref
_stack
[_count - _indexOffset - 1];
128
if (
_stack
is null)
132
else if (_count - _indexOffset ==
_stack
.Length)
134
Array.Resize(ref _stack, 2 *
_stack
.Length);
199
_stack
[_count - _indexOffset] = Current;
214
Current =
_stack
[_count - _indexOffset];
260
_stack
[currentIndex + 1] = Current;
261
Current =
_stack
[currentIndex];
269
Current =
_stack
[_count - _indexOffset];
285
if (
_stack
is not null)
291
Debug.Assert(
_stack
[i].AsyncEnumerator is null);
296
Debug.Assert(
_stack
[i].CollectionEnumerator is null || ReferenceEquals(Current.CollectionEnumerator,
_stack
[i].CollectionEnumerator));
300
DisposeFrame(
_stack
[i].CollectionEnumerator, ref exception);
335
if (
_stack
is not null)
345
Debug.Assert(
_stack
[i].CollectionEnumerator is null || ReferenceEquals(Current.CollectionEnumerator,
_stack
[i].CollectionEnumerator));
346
Debug.Assert(
_stack
[i].AsyncEnumerator is null || ReferenceEquals(Current.AsyncEnumerator,
_stack
[i].AsyncEnumerator));
350
exception = await DisposeFrame(
_stack
[i].CollectionEnumerator,
_stack
[i].AsyncEnumerator, exception).ConfigureAwait(false);
399
AppendStackFrame(sb, ref
_stack
[i - _indexOffset]);