155 writes to charPos
System.Private.Xml (155)
System\Xml\Core\XmlTextReaderImpl.cs (86)
2192
_ps.
charPos
= _ps.charsUsed;
2405
_ps.
charPos
= value;
2606
_ps.
charPos
= initialPos;
2655
_ps.
charPos
= pos;
2662
_ps.
charPos
= pos;
2669
_ps.
charPos
= pos;
3400
_ps.
charPos
= 0;
3606
_ps.
charPos
+= 5;
3633
_ps.
charPos
+= 2;
3734
_ps.
charPos
= nameEndPos;
3746
_ps.
charPos
++;
3759
_ps.
charPos
++;
3836
_ps.
charPos
= pos + 1;
3909
_ps.
charPos
= pos + 1;
3924
_ps.
charPos
= pos + 2;
3948
_ps.
charPos
= pos + 6;
3972
_ps.
charPos
= pos;
4008
_ps.
charPos
= pos;
4131
_ps.
charPos
= pos + 2;
4146
_ps.
charPos
= pos + 2;
4168
_ps.
charPos
= pos + 6;
4191
_ps.
charPos
= pos + 2;
4203
_ps.
charPos
= pos + 1;
4395
_ps.
charPos
= pos;
4405
_ps.
charPos
= pos + 1;
4413
_ps.
charPos
= pos;
4426
_ps.
charPos
= pos + 2;
4642
_ps.
charPos
= pos + 1;
4708
_ps.
charPos
= pos;
4729
_ps.
charPos
= pos + 1;
4743
_ps.
charPos
= pos + 2;
4768
_ps.
charPos
= pos;
4846
_ps.
charPos
= pos;
4859
_ps.
charPos
= pos;
4869
_ps.
charPos
= pos;
4892
_ps.
charPos
= pos;
5116
_ps.
charPos
= pos;
5134
_ps.
charPos
++;
5144
_ps.
charPos
= pos;
5153
_ps.
charPos
= pos;
5168
_ps.
charPos
++;
5186
_ps.
charPos
= pos;
5211
_ps.
charPos
++;
5234
_ps.
charPos
++;
5363
_ps.
charPos
= pos + 1;
5587
_ps.
charPos
++;
5763
_ps.
charPos
= pos;
5944
_ps.
charPos
++;
5992
_ps.
charPos
++;
6012
_ps.
charPos
= endPos + 1;
6214
_ps.
charPos
= nameEndPos;
6339
_ps.
charPos
= pos + 2;
6378
_ps.
charPos
++;
6443
_ps.
charPos
= pos;
6546
_ps.
charPos
= pos + 3;
6596
_ps.
charPos
++;
6659
_ps.
charPos
= pos;
6702
_ps.
charPos
+= 8;
6745
_ps.
charPos
= pos;
6767
_ps.
charPos
+= 6;
6804
_ps.
charPos
+= 6;
6825
_ps.
charPos
++;
6843
_ps.
charPos
++;
6856
_ps.
charPos
++;
6883
_ps.
charPos
= pos + 1;
6888
_ps.
charPos
= pos;
7088
_ps.
charPos
= pos + 1;
7121
_ps.
charPos
= pos;
7134
_ps.
charPos
= pos;
7198
_ps.
charPos
= newPos - charCount;
7264
_ps.
charPos
= pos;
7361
_ps.
charPos
= newPos - 1;
7617
_ps.
charPos
= endPos + 1;
8011
_ps.
charPos
= initialPos;
8224
_ps.
charPos
-= 2;
8232
_ps.
charPos
-= 3;
8240
_ps.
charPos
-= 3;
8388
_ps.
charPos
= endPos;
8397
_ps.
charPos
++;
8493
_ps.
charPos
= pos;
8618
_ps.
charPos
= pos;
8636
_ps.
charPos
++;
8684
_ps.
charPos
= pos;
8716
_ps.
charPos
= pos;
8748
_ps.
charPos
= pos;
8772
_ps.
charPos
= pos;
System\Xml\Core\XmlTextReaderImplAsync.cs (68)
854
_ps.
charPos
= initialPos;
1088
_ps.
charPos
= 0;
1190
_ps.
charPos
+= 5;
1217
_ps.
charPos
+= 2;
1316
_ps.
charPos
= nameEndPos;
1328
_ps.
charPos
++;
1341
_ps.
charPos
++;
1415
_ps.
charPos
= pos + 1;
1488
_ps.
charPos
= pos + 1;
1499
_ps.
charPos
= pos + 2;
1519
_ps.
charPos
= pos + 6;
1538
_ps.
charPos
= pos;
1570
_ps.
charPos
= pos;
1744
_ps.
charPos
= pos + 2;
1755
_ps.
charPos
= pos + 2;
1773
_ps.
charPos
= pos + 6;
1795
_ps.
charPos
= pos + 2;
1806
_ps.
charPos
= pos + 1;
1989
_ps.
charPos
= pos;
2009
_ps.
charPos
= pos + 1;
2017
_ps.
charPos
= pos;
2025
_ps.
charPos
= pos + 2;
2260
_ps.
charPos
= pos + 1;
2341
_ps.
charPos
= pos;
2362
_ps.
charPos
= pos + 1;
2376
_ps.
charPos
= pos + 2;
2401
_ps.
charPos
= pos;
2489
_ps.
charPos
= pos;
2502
_ps.
charPos
= pos;
2512
_ps.
charPos
= pos;
2535
_ps.
charPos
= pos;
2626
_ps.
charPos
= pos;
2644
_ps.
charPos
++;
2654
_ps.
charPos
= pos;
2663
_ps.
charPos
= pos;
2678
_ps.
charPos
++;
2696
_ps.
charPos
= pos;
2727
_ps.
charPos
++;
2750
_ps.
charPos
++;
2880
_ps.
charPos
= pos + 1;
3286
_ps.
charPos
++;
3519
_ps.
charPos
= pos;
3719
_ps.
charPos
++;
3775
_ps.
charPos
++;
3796
_ps.
charPos
= endPos + 1;
3918
_ps.
charPos
= nameEndPos;
4062
_ps.
charPos
= pos + 2;
4102
_ps.
charPos
++;
4167
_ps.
charPos
= pos;
4288
_ps.
charPos
= pos + 3;
4339
_ps.
charPos
++;
4402
_ps.
charPos
= pos;
4442
_ps.
charPos
+= 8;
4491
_ps.
charPos
= pos;
4512
_ps.
charPos
+= 6;
4549
_ps.
charPos
+= 6;
4570
_ps.
charPos
++;
4588
_ps.
charPos
++;
4600
_ps.
charPos
++;
4626
_ps.
charPos
= pos + 1;
4631
_ps.
charPos
= pos;
4830
_ps.
charPos
= pos + 1;
4863
_ps.
charPos
= pos;
4876
_ps.
charPos
= pos;
4925
_ps.
charPos
= newPos - charCount;
4959
_ps.
charPos
= newPos - 1;
5094
_ps.
charPos
= endPos + 1;
5219
_ps.
charPos
= initialPos;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
68
charPos
= 0;
397 references to charPos
System.Private.Xml (397)
System\Xml\Core\XmlTextReaderImpl.cs (229)
1508
if (_ps.charsUsed - _ps.
charPos
== 0)
1529
if (_ps.charsUsed - _ps.
charPos
== 0 && !_ps.entity!.IsExternal)
2191
_stringBuilder.Append(_ps.chars, _ps.
charPos
, _ps.charsUsed - _ps.
charPos
);
2400
return _ps.
charPos
;
2599
int initialPos = _ps.
charPos
;
2842
Debug.Assert(_ps.
charPos
== 0 && _ps.charsUsed == 0 && _ps.textReader == null);
2917
Debug.Assert(_ps.
charPos
== 0 && _ps.charsUsed == 0 && _ps.stream == null);
2947
Debug.Assert(_ps.
charPos
== 0 && _ps.charsUsed == 0);
3176
Debug.Assert(_ps.
charPos
== 0);
3288
Debug.Assert(_ps.charsUsed >= _ps.
charPos
, "The current position must be in the valid character range.");
3296
Debug.Assert(_charactersInDocument >= _ps.charsUsed - _ps.
charPos
,
3298
_charactersInDocument -= _ps.charsUsed - _ps.
charPos
;
3305
Debug.Assert(_charactersFromEntities >= _ps.charsUsed - _ps.
charPos
,
3307
_charactersFromEntities -= _ps.charsUsed - _ps.
charPos
;
3312
if (_ps.
charPos
> 0)
3316
_ps.bytePos += _ps.encoding.GetByteCount(_ps.chars, 0, _ps.
charPos
);
3319
_ps.charsUsed = _ps.
charPos
;
3392
int copyCharsCount = _ps.charsUsed - _ps.
charPos
;
3395
_ps.lineStartPos -= _ps.
charPos
;
3398
BlockCopyChars(_ps.chars, _ps.
charPos
, _ps.chars, 0, copyCharsCount);
3586
while (_ps.charsUsed - _ps.
charPos
< 6)
3594
if (!_ps.chars.AsSpan(_ps.
charPos
).StartsWith(XmlDeclarationBeginning) ||
3595
XmlCharType.IsNameSingleChar(_ps.chars![_ps.
charPos
+ 5]))
3622
if (_ps.chars[_ps.
charPos
] == '?')
3626
if (_ps.chars[_ps.
charPos
+ 1] == '>')
3673
else if (_ps.
charPos
+ 1 == _ps.charsUsed)
3692
switch (_ps.chars.AsSpan(_ps.
charPos
, nameEndPos - _ps.
charPos
))
3733
sb.Append(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
);
3737
if (_ps.chars[_ps.
charPos
] != '=')
3740
if (_ps.chars[_ps.
charPos
] != '=')
3748
char quoteChar = _ps.chars[_ps.
charPos
];
3752
quoteChar = _ps.chars[_ps.
charPos
];
3768
int pos = _ps.
charPos
;
3784
if (_ps.chars.AsSpan(_ps.
charPos
).StartsWith("1.0"))
3789
attr.SetValue(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
3795
string badVersion = new string(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
3800
string encName = new string(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
3810
switch (_ps.chars.AsSpan(_ps.
charPos
, pos - _ps.
charPos
))
3826
attr.SetValue(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
3834
sb.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
3894
int pos = _ps.
charPos
;
3963
Throw(_ps.
charPos
, SR.Xml_InvalidRootData);
4119
int pos = _ps.
charPos
;
4236
if (_ps.charsUsed - _ps.
charPos
!= 0)
4293
int pos = _ps.
charPos
;
4367
_nameTable.Add(chars, _ps.
charPos
, pos - _ps.
charPos
));
4371
int startPos = _ps.
charPos
;
4384
_nameTable.Add(chars, _ps.
charPos
, prefixLen),
4418
pos = _ps.
charPos
;
4536
while (_ps.charsUsed - _ps.
charPos
< prefLen + locLen + 1)
4549
if (!chars.AsSpan(_ps.
charPos
).StartsWith(startTagNode.localName))
4557
int colonPos = _ps.
charPos
+ prefLen;
4558
if (!chars.AsSpan(_ps.
charPos
).StartsWith(startTagNode.prefix) ||
4572
pos = _ps.
charPos
+ nameLen;
4661
args[3] = new string(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
4674
int pos = _ps.
charPos
;
4764
if (pos == _ps.
charPos
)
4848
pos = _ps.
charPos
;
4861
pos = _ps.
charPos
;
4886
string val = new string(chars, _ps.
charPos
, pos - _ps.
charPos
);
4890
attr.SetValue(chars, _ps.
charPos
, pos - _ps.
charPos
);
4897
pos = _ps.
charPos
;
4929
pos = _ps.
charPos
;
5113
if (pos - _ps.
charPos
> 0)
5115
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
5182
if (pos - _ps.
charPos
> 0)
5184
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
5237
pos = _ps.
charPos
;
5267
pos = _ps.
charPos
;
5270
pos = _ps.
charPos
;
5308
if (_ps.charsUsed - _ps.
charPos
> 0)
5310
if (_ps.chars[_ps.
charPos
] != (char)0xD)
5345
pos = _ps.
charPos
;
5541
int pos = _ps.
charPos
;
5571
if (pos - _ps.
charPos
> 0)
5632
if (pos > _ps.
charPos
)
5659
pos = _ps.
charPos
;
5701
int offset = pos - _ps.
charPos
;
5704
pos = _ps.
charPos
+ offset;
5709
ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.
charPos
+ offset);
5716
if (pos > _ps.
charPos
)
5723
if (_ps.charsUsed - _ps.
charPos
> 0)
5725
if (_ps.chars[_ps.
charPos
] != (char)0xD && _ps.chars[_ps.
charPos
] != ']')
5748
pos = _ps.
charPos
;
5761
startPos = _ps.
charPos
;
5908
if (_ps.chars[_ps.
charPos
] == '<' || _ps.charsUsed - _ps.
charPos
== 0 || ZeroEndingStream(_ps.
charPos
))
5917
if (_ps.chars[_ps.
charPos
] == '<' || _ps.charsUsed - _ps.
charPos
== 0 || ZeroEndingStream(_ps.
charPos
))
5929
if (XmlCharType.IsCharData(_ps.chars[_ps.
charPos
]))
5935
ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.
charPos
);
5943
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
5953
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
5955
if (_ps.
charPos
+ 1 == _ps.charsUsed)
5964
if (_ps.chars[_ps.
charPos
+ 1] == '#')
6011
string entityName = _nameTable.Add(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
6208
string target = _nameTable.Add(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
);
6229
char ch = _ps.chars[_ps.
charPos
];
6230
Debug.Assert(_ps.
charPos
< _ps.charsUsed);
6233
if (_ps.charsUsed - _ps.
charPos
< 2)
6237
if (ch != '?' || _ps.chars[_ps.
charPos
+ 1] != '>')
6239
Throw(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.
charPos
));
6300
if (_ps.charsUsed - _ps.
charPos
< 2)
6309
int pos = _ps.
charPos
;
6338
outStartPos = _ps.
charPos
;
6362
if (pos - _ps.
charPos
> 0)
6442
outStartPos = _ps.
charPos
;
6504
if (_ps.charsUsed - _ps.
charPos
< 3)
6514
int pos = _ps.
charPos
;
6545
outStartPos = _ps.
charPos
;
6580
if (pos - _ps.
charPos
> 0)
6657
outStartPos = _ps.
charPos
;
6673
while (_ps.charsUsed - _ps.
charPos
< 8)
6681
if (!_ps.chars.AsSpan(_ps.
charPos
).StartsWith("DOCTYPE"))
6687
if (!XmlCharType.IsWhiteSpace(_ps.chars[_ps.
charPos
+ 7]))
6689
ThrowExpectingWhitespace(_ps.
charPos
+ 7);
6694
Throw(_ps.
charPos
- 2, SR.Xml_MultipleDTDsProvided); // position just before <!DOCTYPE
6699
Throw(_ps.
charPos
- 2, SR.Xml_DtdAfterRootElement);
6752
if (_ps.chars[_ps.
charPos
] == 'P')
6755
while (_ps.charsUsed - _ps.
charPos
< 6)
6763
if (!_ps.chars.AsSpan(_ps.
charPos
).StartsWith("PUBLIC"))
6772
ThrowExpectingWhitespace(_ps.
charPos
);
6781
ThrowExpectingWhitespace(_ps.
charPos
);
6789
else if (_ps.chars[_ps.
charPos
] == 'S')
6792
while (_ps.charsUsed - _ps.
charPos
< 6)
6800
if (!_ps.chars.AsSpan(_ps.
charPos
).StartsWith("SYSTEM"))
6809
ThrowExpectingWhitespace(_ps.
charPos
);
6817
else if (_ps.chars[_ps.
charPos
] != '[' && _ps.chars[_ps.
charPos
] != '>')
6823
if (_ps.chars[_ps.
charPos
] == '[')
6830
if (_ps.chars[_ps.
charPos
] != '>')
6835
else if (_ps.chars[_ps.
charPos
] == '>')
6850
char quoteChar = _ps.chars[_ps.
charPos
];
6869
int pos = _ps.
charPos
;
7041
if (_ps.charsUsed - _ps.
charPos
> 0)
7043
if (_ps.chars[_ps.
charPos
] != (char)0xD)
7056
pos = _ps.
charPos
;
7062
int pos = _ps.
charPos
;
7080
int tmp1 = pos - _ps.
charPos
;
7085
sb.Append(chars, _ps.
charPos
, tmp1);
7117
int tmp2 = pos - _ps.
charPos
;
7120
sb?.Append(_ps.chars, _ps.
charPos
, tmp2);
7130
int tmp3 = pos - _ps.
charPos
;
7133
sb?.Append(_ps.chars, _ps.
charPos
, tmp3);
7140
if (_ps.charsUsed - _ps.
charPos
== 0)
7144
if (_ps.chars[_ps.
charPos
] != (char)0xD)
7151
pos = _ps.
charPos
;
7183
switch (newPos = ParseNumericCharRefInline(_ps.
charPos
, expand, internalSubsetBuilder, out charCount, out entityType))
7193
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
7296
internalSubsetBuilder?.Append(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
+ 1);
7324
internalSubsetBuilder?.Append(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
+ 1);
7344
switch (newPos = ParseNamedCharRefInline(_ps.
charPos
, expand, internalSubsetBuilder))
7356
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
7490
internalSubsetBuilder?.Append(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
7509
int pos = _ps.
charPos
+ startOffset;
7559
colonOffset = pos - _ps.
charPos
;
7565
colonOffset = pos - _ps.
charPos
;
7583
colonPos = (colonOffset == -1) ? -1 : _ps.
charPos
+ colonOffset;
7589
int offset = pos - _ps.
charPos
;
7591
pos = _ps.
charPos
+ offset;
7616
string entityName = _nameTable.Add(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
7666
string localName = _nameTable.Add(_ps.chars, _ps.
charPos
, endNamePos - _ps.
charPos
);
7672
int startPos = _ps.
charPos
;
7674
if (prefixLen == _lastPrefix.Length && _ps.chars.AsSpan(_ps.
charPos
).StartsWith(_lastPrefix))
8003
int initialPos = _ps.
charPos
;
8129
_incReadLeftStartPos = _ps.
charPos
;
8130
_incReadLeftEndPos = _ps.
charPos
;
8223
Debug.Assert(_ps.chars.AsSpan(_ps.
charPos
- 2).StartsWith("?>"));
8231
Debug.Assert(_ps.chars.AsSpan(_ps.
charPos
- 3).StartsWith("-->"));
8239
Debug.Assert(_ps.chars.AsSpan(_ps.
charPos
- 3).StartsWith("]]>"));
8269
startPos = _ps.
charPos
;
8373
Debug.Assert(_ps.
charPos
- pos == 0);
8374
Debug.Assert(_ps.
charPos
- startPos == 0);
8379
if ((endPos - _ps.
charPos
- 2) == checkName.Length && chars.AsSpan(_ps.
charPos
+ 2).StartsWith(checkName) &&
8393
if (_ps.chars[_ps.
charPos
] != '>')
8405
startPos = _ps.
charPos
;
8413
Debug.Assert(_ps.
charPos
- pos == 0);
8414
Debug.Assert(_ps.
charPos
- startPos == 0);
8418
if (endPos - _ps.
charPos
- 1 == _curNode.localName.Length && _ps.chars.AsSpan(_ps.
charPos
+ 1).StartsWith(_curNode.localName) &&
8427
startPos = _ps.
charPos
;
8541
ParseAttributeValueSlow(_ps.
charPos
, ' ', _curNode); // The quote char is intentionally empty (space) because we need to parse ' and " into the attribute value
8567
int pos = _ps.
charPos
;
8613
if (pos - _ps.
charPos
> 0)
8615
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
8627
if (_normalize && XmlCharType.IsWhiteSpace(chars[_ps.
charPos
]) && pos - _ps.
charPos
== 1)
8629
chars[_ps.
charPos
] = (char)0x20; // CDATA normalization of character references in entities
8681
if (pos - _ps.
charPos
> 0)
8683
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
8708
pos = _ps.
charPos
;
8713
if (pos - _ps.
charPos
> 0)
8715
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
8778
if (_ps.
charPos
== _ps.charsUsed)
8785
if (XmlCharType.IsNCNameSingleChar(_ps.chars[_ps.
charPos
]))
8787
int pos = _ps.
charPos
+ 1;
8792
return new string(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
8796
Debug.Assert(_ps.
charPos
< _ps.charsUsed);
8797
return new string(_ps.chars, _ps.
charPos
, 1);
System\Xml\Core\XmlTextReaderImplAsync.cs (167)
847
int initialPos = _ps.
charPos
;
868
Debug.Assert(_ps.
charPos
== 0 && _ps.charsUsed == 0 && _ps.textReader == null);
944
Debug.Assert(_ps.
charPos
== 0 && _ps.charsUsed == 0 && _ps.stream == null);
1080
int copyCharsCount = _ps.charsUsed - _ps.
charPos
;
1083
_ps.lineStartPos -= _ps.
charPos
;
1086
BlockCopyChars(_ps.chars, _ps.
charPos
, _ps.chars, 0, copyCharsCount);
1171
while (_ps.charsUsed - _ps.
charPos
< 6)
1179
if (!_ps.chars.AsSpan(_ps.
charPos
).StartsWith(XmlDeclarationBeginning) ||
1180
XmlCharType.IsNameSingleChar(_ps.chars[_ps.
charPos
+ 5]))
1206
if (_ps.chars[_ps.
charPos
] == '?')
1210
if (_ps.chars[_ps.
charPos
+ 1] == '>')
1257
else if (_ps.
charPos
+ 1 == _ps.charsUsed)
1276
switch (_ps.chars.AsSpan(_ps.
charPos
, nameEndPos - _ps.
charPos
))
1315
sb.Append(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
);
1319
if (_ps.chars[_ps.
charPos
] != '=')
1322
if (_ps.chars[_ps.
charPos
] != '=')
1330
char quoteChar = _ps.chars[_ps.
charPos
];
1334
quoteChar = _ps.chars[_ps.
charPos
];
1349
int pos = _ps.
charPos
;
1366
if (_ps.chars.AsSpan(_ps.
charPos
).StartsWith("1.0"))
1370
attr!.SetValue(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
1376
string badVersion = new string(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
1381
string encName = new string(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
1390
switch (_ps.chars.AsSpan(_ps.
charPos
, pos - _ps.
charPos
))
1405
attr!.SetValue(_ps.chars, _ps.
charPos
, pos - _ps.
charPos
);
1413
sb.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
1474
int pos = _ps.
charPos
;
1529
Throw(_ps.
charPos
, SR.Xml_InvalidRootData);
1612
int pos = _ps.
charPos
;
1733
int pos = _ps.
charPos
;
1833
if (_ps.charsUsed - _ps.
charPos
!= 0)
1858
int pos = _ps.
charPos
;
1960
_nameTable.Add(chars, _ps.
charPos
, pos - _ps.
charPos
));
1964
int startPos = _ps.
charPos
;
1977
_nameTable.Add(chars, _ps.
charPos
, prefixLen),
2003
int pos = _ps.
charPos
;
2067
if (_ps.charsUsed - _ps.
charPos
< prefLen + locLen + 1)
2089
while (_ps.charsUsed - _ps.
charPos
< prefLen + locLen + 1)
2108
if (!chars.AsSpan(_ps.
charPos
).StartsWith(startTagNode.localName))
2116
int colonPos = _ps.
charPos
+ prefLen;
2117
if (!chars.AsSpan(_ps.
charPos
).StartsWith(startTagNode.prefix) ||
2187
pos = _ps.
charPos
+ nameLen;
2294
args[3] = new string(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
2307
int pos = _ps.
charPos
;
2397
if (pos == _ps.
charPos
)
2491
pos = _ps.
charPos
;
2504
pos = _ps.
charPos
;
2529
string val = new string(chars, _ps.
charPos
, pos - _ps.
charPos
);
2533
attr.SetValue(chars, _ps.
charPos
, pos - _ps.
charPos
);
2540
pos = _ps.
charPos
;
2572
pos = _ps.
charPos
;
2623
if (pos - _ps.
charPos
> 0)
2625
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
2692
if (pos - _ps.
charPos
> 0)
2694
_stringBuilder.Append(chars, _ps.
charPos
, pos - _ps.
charPos
);
2753
pos = _ps.
charPos
;
2782
pos = _ps.
charPos
;
2785
pos = _ps.
charPos
;
2823
if (_ps.charsUsed - _ps.
charPos
> 0)
2825
if (_ps.chars[_ps.
charPos
] != (char)0xD)
2861
pos = _ps.
charPos
;
3169
Task<(int, int, int, bool)> task = ParseTextAsync(outOrChars, _ps.chars, _ps.
charPos
, 0, -1, outOrChars);
3270
if (pos - _ps.
charPos
> 0)
3373
if (pos > _ps.
charPos
)
3409
pos = _ps.
charPos
;
3441
int offset = pos - _ps.
charPos
;
3445
pos = _ps.
charPos
+ offset;
3452
ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.
charPos
+ offset);
3460
if (pos > _ps.
charPos
)
3469
if (_ps.charsUsed - _ps.
charPos
> 0)
3471
if (_ps.chars[_ps.
charPos
] != (char)0xD && _ps.chars[_ps.
charPos
] != ']')
3499
pos = _ps.
charPos
;
3517
int startPos = _ps.
charPos
;
3684
if (_ps.chars[_ps.
charPos
] == '<' || _ps.charsUsed - _ps.
charPos
== 0 || await ZeroEndingStreamAsync(_ps.
charPos
).ConfigureAwait(false))
3693
if (_ps.chars[_ps.
charPos
] == '<' || _ps.charsUsed - _ps.
charPos
== 0 || await ZeroEndingStreamAsync(_ps.
charPos
).ConfigureAwait(false))
3705
if (XmlCharType.IsCharData(_ps.chars[_ps.
charPos
]))
3711
ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.
charPos
);
3718
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
3729
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
3731
if (_ps.
charPos
+ 1 == _ps.charsUsed)
3740
if (_ps.chars[_ps.
charPos
+ 1] == '#')
3795
string entityName = _nameTable.Add(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
3912
string target = _nameTable.Add(_ps.chars, _ps.
charPos
, nameEndPos - _ps.
charPos
);
3933
char ch = _ps.chars[_ps.
charPos
];
3934
Debug.Assert(_ps.
charPos
< _ps.charsUsed);
3937
if (_ps.charsUsed - _ps.
charPos
< 2)
3941
if (ch != '?' || _ps.chars[_ps.
charPos
+ 1] != '>')
3943
Throw(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.
charPos
));
4023
if (_ps.charsUsed - _ps.
charPos
< 2)
4031
int pos = _ps.
charPos
;
4061
outStartPos = _ps.
charPos
;
4086
if (pos - _ps.
charPos
> 0)
4166
outStartPos = _ps.
charPos
;
4247
if (_ps.charsUsed - _ps.
charPos
< 3)
4256
int pos = _ps.
charPos
;
4287
outStartPos = _ps.
charPos
;
4323
if (pos - _ps.
charPos
> 0)
4400
outStartPos = _ps.
charPos
;
4417
while (_ps.charsUsed - _ps.
charPos
< 8)
4424
if (!_ps.chars.AsSpan(_ps.
charPos
).StartsWith("DOCTYPE"))
4428
if (!XmlCharType.IsWhiteSpace(_ps.chars[_ps.
charPos
+ 7]))
4430
ThrowExpectingWhitespace(_ps.
charPos
+ 7);
4435
Throw(_ps.
charPos
- 2, SR.Xml_MultipleDTDsProvided); // position just before <!DOCTYPE
4439
Throw(_ps.
charPos
- 2, SR.Xml_DtdAfterRootElement);
4497
if (_ps.chars[_ps.
charPos
] == 'P')
4500
while (_ps.charsUsed - _ps.
charPos
< 6)
4508
if (!_ps.chars.AsSpan(_ps.
charPos
).StartsWith("PUBLIC"))
4517
ThrowExpectingWhitespace(_ps.
charPos
);
4526
ThrowExpectingWhitespace(_ps.
charPos
);
4534
else if (_ps.chars[_ps.
charPos
] == 'S')
4537
while (_ps.charsUsed - _ps.
charPos
< 6)
4545
if (!_ps.chars.AsSpan(_ps.
charPos
).StartsWith("SYSTEM"))
4554
ThrowExpectingWhitespace(_ps.
charPos
);
4562
else if (_ps.chars[_ps.
charPos
] != '[' && _ps.chars[_ps.
charPos
] != '>')
4568
if (_ps.chars[_ps.
charPos
] == '[')
4575
if (_ps.chars[_ps.
charPos
] != '>')
4580
else if (_ps.chars[_ps.
charPos
] == '>')
4594
char quoteChar = _ps.chars[_ps.
charPos
];
4612
int pos = _ps.
charPos
;
4784
if (_ps.charsUsed - _ps.
charPos
> 0)
4786
if (_ps.chars[_ps.
charPos
] != (char)0xD)
4799
pos = _ps.
charPos
;
4805
int pos = _ps.
charPos
;
4822
int tmp1 = pos - _ps.
charPos
;
4827
sb.Append(chars, _ps.
charPos
, tmp1);
4859
int tmp2 = pos - _ps.
charPos
;
4862
sb?.Append(_ps.chars, _ps.
charPos
, tmp2);
4872
int tmp3 = pos - _ps.
charPos
;
4875
sb?.Append(_ps.chars, _ps.
charPos
, tmp3);
4882
if (_ps.charsUsed - _ps.
charPos
== 0)
4886
if (_ps.chars[_ps.
charPos
] != (char)0xD)
4893
pos = _ps.
charPos
;
4912
switch (newPos = ParseNumericCharRefInline(_ps.
charPos
, expand, internalSubsetBuilder, out charCount, out entityType))
4920
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
4944
switch (newPos = ParseNamedCharRefInline(_ps.
charPos
, expand, internalSubsetBuilder))
4954
Debug.Assert(_ps.chars[_ps.
charPos
] == '&');
4982
int pos = _ps.
charPos
+ startOffset;
5034
colonOffset = pos - _ps.
charPos
;
5040
colonOffset = pos - _ps.
charPos
;
5060
colonPos = (colonOffset == -1) ? -1 : _ps.
charPos
+ colonOffset;
5067
int offset = pos - _ps.
charPos
;
5069
pos = _ps.
charPos
+ offset;
5093
string entityName = _nameTable.Add(_ps.chars, _ps.
charPos
, endPos - _ps.
charPos
);
5212
int initialPos = _ps.
charPos
;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
114
return
charPos
- lineStartPos;