7 writes to _count
System.Text.Json (7)
System\Text\Json\Serialization\WriteStack.cs (7)
191_count = 1; 202_count++; 213if (_count++ > 0 || _indexOffset == 0) 244_count = 0; 251_continuationCount = _count--; 253else if (--_count == 0 && _indexOffset > 0) 267if (--_count > 0 || _indexOffset == 0)
17 references to _count
System.Text.Json (17)
System\Text\Json\Serialization\WriteStack.cs (17)
20public readonly int CurrentDepth => _count; 34Debug.Assert(_count - _indexOffset > 0); 36return ref _stack[_count - _indexOffset - 1]; 56/// Offset used to derive the index of the current frame in the stack buffer from the current value of <see cref="_count"/>, 135else if (_count - _indexOffset == _stack.Length) 178return _count == 0 ? Current.JsonTypeInfo : Current.JsonPropertyInfo!.JsonTypeInfo; 187if (_count == 0 && Current.PolymorphicSerializationState == PolymorphicSerializationState.None) 200_stack[_count - _indexOffset] = Current; 215Current = _stack[_count - _indexOffset]; 219if (_continuationCount == _count) 233Debug.Assert(_count > 0); 240if (_count == 1 && _indexOffset > 0) 259int currentIndex = _count - _indexOffset; 269Current = _stack[_count - _indexOffset]; 314int stackSize = Math.Max(_count, _continuationCount); 352int stackSize = Math.Max(_count, _continuationCount); 3960 => (_count - 1, true), // Not a continuation, report previous frames and Current.