64 writes to _consumed
System.Text.Json (64)
System\Text\Json\Reader\Utf8JsonReader.cs (25)
235
_consumed
= 0;
747
_consumed
++;
781
_consumed
++;
810
_consumed
++;
875
_consumed
= prevConsumed;
967
_consumed
++;
977
_consumed
++;
993
_consumed
+= numberOfBytes;
1011
for (; _consumed < localBuffer.Length;
_consumed
++)
1146
_consumed
+= literal.Length;
1213
_consumed
+= consumed;
1273
_consumed
++;
1302
_consumed
+= idx + 2;
1401
_consumed
+= idx + 2;
1710
_consumed
= prevConsumed;
1757
_consumed
++;
1764
_consumed
--;
1894
_consumed
++;
1901
_consumed
--;
2016
_consumed
= prevConsumed;
2183
_consumed
= prevConsumed;
2226
_consumed
++;
2233
_consumed
--;
2398
_consumed
+= 2 + toConsume;
2474
_consumed
+= 4 + idx;
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (39)
46
_consumed
= 0;
184
_consumed
= prevConsumed;
330
_consumed
= 0;
342
_consumed
++;
352
_consumed
++;
365
_consumed
+= numberOfBytes;
525
_consumed
= prevConsumed;
533
_consumed
+= consumed;
679
_consumed
+= consumed;
738
_consumed
++;
768
_consumed
+= idx + 2;
821
_consumed
= idx + 1; // Add 1 for the end quote of the string.
933
_consumed
= idx + 1; // Add 1 for the end quote of the string.
1083
_consumed
= idx + 1; // Add 1 for the end quote of the string.
1092
_consumed
+= idx + 2;
1112
_consumed
= state._prevConsumed;
1540
_consumed
= prevConsumed;
1589
_consumed
++;
1596
_consumed
--;
1604
_consumed
--;
1735
_consumed
++;
1742
_consumed
--;
1750
_consumed
--;
1867
_consumed
= prevConsumed;
2037
_consumed
= prevConsumed;
2082
_consumed
++;
2089
_consumed
--;
2097
_consumed
--;
2225
_consumed
= 0;
2233
_consumed
++;
2267
_consumed
++;
2329
_consumed
++;
2341
_consumed
+= idx + 1;
2357
_consumed
++;
2368
_consumed
+= localBuffer.Length;
2520
_consumed
++;
2532
_consumed
++;
2547
_consumed
+= nextIdx;
2569
_consumed
+= localBuffer.Length;
111 references to _consumed
System.Text.Json (111)
System\Text\Json\Reader\Utf8JsonReader.cs (60)
87
return _totalConsumed +
_consumed
;
174
return _sequence.GetPosition(
_consumed
, _currentPosition);
746
ValueSpan = _buffer.Slice(
_consumed
, 1);
768
ValueSpan = _buffer.Slice(
_consumed
, 1);
780
ValueSpan = _buffer.Slice(
_consumed
, 1);
802
ValueSpan = _buffer.Slice(
_consumed
, 1);
826
byte first = _buffer[
_consumed
];
839
first = _buffer[
_consumed
];
842
TokenStartIndex =
_consumed
;
868
int prevConsumed =
_consumed
;
919
if (
_consumed
>= (uint)_buffer.Length)
949
if (
_consumed
>= (uint)_buffer.Length)
966
ValueSpan = _buffer.Slice(
_consumed
, 1);
976
ValueSpan = _buffer.Slice(
_consumed
, 1);
988
if (!TryGetNumber(localBuffer.Slice(
_consumed
), out int numberOfBytes))
1011
for (;
_consumed
< localBuffer.Length; _consumed++)
1013
byte val = localBuffer[
_consumed
];
1094
if (
_consumed
>= (uint)_buffer.Length)
1103
marker = _buffer[
_consumed
];
1113
marker = _buffer[
_consumed
];
1116
TokenStartIndex =
_consumed
;
1135
ReadOnlySpan<byte> span = _buffer.Slice(
_consumed
);
1207
if (!TryGetNumber(_buffer.Slice(
_consumed
), out int consumed))
1216
if (
_consumed
>= (uint)_buffer.Length)
1223
ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[
_consumed
- 1]);
1230
((
_consumed
< _buffer.Length) &&
1232
JsonConstants.Delimiters.IndexOf(_buffer[
_consumed
]) >= 0)
1233
|| (_isNotPrimitive ^ (
_consumed
>= (uint)_buffer.Length)));
1252
byte first = _buffer[
_consumed
];
1264
first = _buffer[
_consumed
];
1281
Debug.Assert(_buffer.Length >=
_consumed
+ 1);
1282
Debug.Assert(_buffer[
_consumed
] == JsonConstants.Quote);
1285
ReadOnlySpan<byte> localBuffer = _buffer.Slice(
_consumed
+ 1);
1698
int prevConsumed =
_consumed
;
1760
if (
_consumed
>= (uint)_buffer.Length)
1770
byte first = _buffer[
_consumed
];
1781
first = _buffer[
_consumed
];
1784
TokenStartIndex =
_consumed
;
1859
byte first = _buffer[
_consumed
];
1869
first = _buffer[
_consumed
];
1884
TokenStartIndex =
_consumed
;
1897
if (
_consumed
>= (uint)_buffer.Length)
1907
first = _buffer[
_consumed
];
1918
first = _buffer[
_consumed
];
1921
TokenStartIndex =
_consumed
;
2010
int prevConsumed =
_consumed
;
2094
marker = _buffer[
_consumed
];
2104
marker = _buffer[
_consumed
];
2130
marker = _buffer[
_consumed
];
2141
marker = _buffer[
_consumed
];
2162
TokenStartIndex =
_consumed
;
2177
int prevConsumed =
_consumed
;
2229
if (
_consumed
>= (uint)_buffer.Length)
2239
marker = _buffer[
_consumed
];
2250
marker = _buffer[
_consumed
];
2258
TokenStartIndex =
_consumed
;
2317
ReadOnlySpan<byte> localBuffer = _buffer.Slice(
_consumed
+ 1);
2494
ReadOnlySpan<byte> localBuffer = _buffer.Slice(
_consumed
+ 1);
2501
return ConsumeSingleLineComment(localBuffer.Slice(1),
_consumed
);
2505
return ConsumeMultiLineComment(localBuffer.Slice(1),
_consumed
);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (51)
133
byte first = _buffer[
_consumed
];
146
first = _buffer[
_consumed
];
176
int prevConsumed =
_consumed
;
252
if (
_consumed
>= (uint)_buffer.Length)
280
if (
_consumed
>= (uint)_buffer.Length)
329
_totalConsumed +=
_consumed
;
341
ValueSpan = _buffer.Slice(
_consumed
, 1);
351
ValueSpan = _buffer.Slice(
_consumed
, 1);
360
if (!TryGetNumberMultiSegment(_buffer.Slice(
_consumed
), out int numberOfBytes))
384
if (
_consumed
< _buffer.Length)
461
if (
_consumed
>= (uint)_buffer.Length)
478
marker = _buffer[
_consumed
];
489
marker = _buffer[
_consumed
];
512
ReadOnlySpan<byte> span = _buffer.Slice(
_consumed
);
520
int prevConsumed =
_consumed
;
570
int startConsumed =
_consumed
;
673
if (!TryGetNumberMultiSegment(_buffer.Slice(
_consumed
), out int consumed))
681
if (
_consumed
>= (uint)_buffer.Length)
688
ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[
_consumed
- 1]);
695
((
_consumed
< _buffer.Length) &&
697
JsonConstants.Delimiters.IndexOf(_buffer[
_consumed
]) >= 0)
698
|| (_isNotPrimitive ^ (
_consumed
>= (uint)_buffer.Length)));
717
byte first = _buffer[
_consumed
];
729
first = _buffer[
_consumed
];
746
Debug.Assert(_buffer.Length >=
_consumed
+ 1);
747
Debug.Assert(_buffer[
_consumed
] == JsonConstants.Quote);
750
ReadOnlySpan<byte> localBuffer = _buffer.Slice(
_consumed
+ 1);
793
int leftOver = _buffer.Length -
_consumed
;
963
int leftOverFromConsumed = _buffer.Length -
_consumed
;
1527
int prevConsumed =
_consumed
;
1592
if (
_consumed
>= (uint)_buffer.Length)
1611
byte first = _buffer[
_consumed
];
1622
first = _buffer[
_consumed
];
1700
byte first = _buffer[
_consumed
];
1710
first = _buffer[
_consumed
];
1738
if (
_consumed
>= (uint)_buffer.Length)
1757
first = _buffer[
_consumed
];
1768
first = _buffer[
_consumed
];
1861
int prevConsumed =
_consumed
;
1946
marker = _buffer[
_consumed
];
1956
marker = _buffer[
_consumed
];
1982
marker = _buffer[
_consumed
];
1993
marker = _buffer[
_consumed
];
2030
int prevConsumed =
_consumed
;
2085
if (
_consumed
>= (uint)_buffer.Length)
2104
marker = _buffer[
_consumed
];
2115
marker = _buffer[
_consumed
];
2181
SequencePosition start = new SequencePosition(_currentPosition.GetObject(), _currentPosition.GetInteger() +
_consumed
);
2192
SequencePosition end = new SequencePosition(_currentPosition.GetObject(), _currentPosition.GetInteger() +
_consumed
);
2236
ReadOnlySpan<byte> localBuffer = _buffer.Slice(
_consumed
);
2601
return new PartialStateForRollback(_totalConsumed, _bytePositionInLine,
_consumed
, _currentPosition);