2 writes to _stack
System.Text.Json (2)
System\Text\Json\Serialization\WriteStack.cs (2)
136
_stack
= new WriteStackFrame[4];
140
Array.Resize(ref
_stack
, 2 * _stack.Length);
23 references to _stack
System.Text.Json (23)
System\Text\Json\Serialization\WriteStack.cs (23)
36
Debug.Assert(
_stack
is not null);
37
return ref
_stack
[_count - _indexOffset - 1];
134
if (
_stack
is null)
138
else if (_count - _indexOffset ==
_stack
.Length)
140
Array.Resize(ref _stack, 2 *
_stack
.Length);
205
_stack
[_count - _indexOffset] = Current;
220
Current =
_stack
[_count - _indexOffset];
266
_stack
[currentIndex + 1] = Current;
267
Current =
_stack
[currentIndex];
275
Current =
_stack
[_count - _indexOffset];
320
if (
_stack
is not null)
326
Debug.Assert(
_stack
[i].AsyncDisposable is null);
331
Debug.Assert(
_stack
[i].CollectionEnumerator is null || ReferenceEquals(Current.CollectionEnumerator,
_stack
[i].CollectionEnumerator));
335
DisposeFrame(
_stack
[i].CollectionEnumerator, ref exception);
370
if (
_stack
is not null)
380
Debug.Assert(
_stack
[i].CollectionEnumerator is null || ReferenceEquals(Current.CollectionEnumerator,
_stack
[i].CollectionEnumerator));
381
Debug.Assert(
_stack
[i].AsyncDisposable is null || ReferenceEquals(Current.AsyncDisposable,
_stack
[i].AsyncDisposable));
385
exception = await DisposeFrame(
_stack
[i].CollectionEnumerator,
_stack
[i].AsyncDisposable, exception).ConfigureAwait(false);
434
AppendStackFrame(sb, ref
_stack
[i - _indexOffset]);