2 writes to _stack
System.Text.Json (2)
System\Text\Json\Serialization\WriteStack.cs (2)
136_stack = new WriteStackFrame[4]; 140Array.Resize(ref _stack, 2 * _stack.Length);
15 references to _stack
System.Text.Json (15)
System\Text\Json\Serialization\WriteStack.cs (15)
36Debug.Assert(_stack is not null); 37return ref _stack[_count - _indexOffset - 1]; 134if (_stack is null) 138else if (_count - _indexOffset == _stack.Length) 140Array.Resize(ref _stack, 2 * _stack.Length); 203_stack[_count - _indexOffset] = Current; 218Current = _stack[_count - _indexOffset]; 263_stack[currentIndex + 1] = Current; 264Current = _stack[currentIndex]; 272Current = _stack[_count - _indexOffset]; 320Debug.Assert(_stack[i].AsyncDisposable is null); 321DisposeFrame(_stack[i].CollectionEnumerator, ref exception); 358exception = await DisposeFrame(_stack[i].CollectionEnumerator, _stack[i].AsyncDisposable, exception).ConfigureAwait(false); 406AppendStackFrame(sb, ref _stack[i - _indexOffset]);