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