7 writes to _count
System.Text.Json (7)
System\Text\Json\Serialization\WriteStack.cs (7)
196
_count
= 1;
207
_count
++;
218
if (
_count
++ > 0 || _indexOffset == 0)
250
_count
= 0;
257
_continuationCount =
_count
--;
259
else if (--
_count
== 0 && _indexOffset > 0)
273
if (--
_count
> 0 || _indexOffset == 0)
20 references to _count
System.Text.Json (20)
System\Text\Json\Serialization\WriteStack.cs (20)
21
public readonly int CurrentDepth =>
_count
;
35
Debug.Assert(
_count
- _indexOffset > 0);
37
return 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
"/>,
138
else if (
_count
- _indexOffset == _stack.Length)
181
return
_count
== 0 ? Current.JsonTypeInfo : Current.JsonPropertyInfo!.JsonTypeInfo;
186
Debug.Assert(_continuationCount == 0 ||
_count
< _continuationCount);
192
if (
_count
== 0 && Current.PolymorphicSerializationState == PolymorphicSerializationState.None)
205
_stack[
_count
- _indexOffset] = Current;
220
Current = _stack[
_count
- _indexOffset];
224
if (_continuationCount ==
_count
)
238
Debug.Assert(
_count
> 0);
239
Debug.Assert(_continuationCount == 0 ||
_count
< _continuationCount);
246
if (
_count
== 1 && _indexOffset > 0)
265
int currentIndex =
_count
- _indexOffset;
275
Current = _stack[
_count
- _indexOffset];
322
int currentIndex =
_count
- _indexOffset;
372
Debug.Assert(_continuationCount == 0 ||
_count
< _continuationCount);
373
int currentIndex =
_count
- _indexOffset;
427
0 => (
_count
- 1, true), // Not a continuation, report previous frames and Current.