7 writes to _count
System.Text.Json (7)
System\Text\Json\Serialization\WriteStack.cs (7)
194_count = 1; 205_count++; 216if (_count++ > 0 || _indexOffset == 0) 247_count = 0; 254_continuationCount = _count--; 256else if (--_count == 0 && _indexOffset > 0) 270if (--_count > 0 || _indexOffset == 0)
17 references to _count
System.Text.Json (17)
System\Text\Json\Serialization\WriteStack.cs (17)
21public readonly int CurrentDepth => _count; 35Debug.Assert(_count - _indexOffset > 0); 37return ref _stack[_count - _indexOffset - 1]; 57/// Offset used to derive the index of the current frame in the stack buffer from the current value of <see cref="_count"/>, 138else if (_count - _indexOffset == _stack.Length) 181return _count == 0 ? Current.JsonTypeInfo : Current.JsonPropertyInfo!.JsonTypeInfo; 190if (_count == 0 && Current.PolymorphicSerializationState == PolymorphicSerializationState.None) 203_stack[_count - _indexOffset] = Current; 218Current = _stack[_count - _indexOffset]; 222if (_continuationCount == _count) 236Debug.Assert(_count > 0); 243if (_count == 1 && _indexOffset > 0) 262int currentIndex = _count - _indexOffset; 272Current = _stack[_count - _indexOffset]; 317int stackSize = Math.Max(_count, _continuationCount); 355int stackSize = Math.Max(_count, _continuationCount); 3990 => (_count - 1, true), // Not a continuation, report previous frames and Current.