155 writes to charPos
System.Xml (155)
System\Xml\Core\XmlTextReaderImpl.cs (86)
2049
ps.
charPos
= ps.charsUsed;
2236
ps.
charPos
= value;
2411
ps.
charPos
= initialPos;
2453
ps.
charPos
= pos;
2458
ps.
charPos
= pos;
2463
ps.
charPos
= pos;
3126
ps.
charPos
= 0;
3292
ps.
charPos
+= 5;
3315
ps.
charPos
+= 2;
3402
ps.
charPos
= nameEndPos;
3412
ps.
charPos
++;
3423
ps.
charPos
++;
3500
ps.
charPos
= pos + 1;
3570
ps.
charPos
= pos + 1;
3582
ps.
charPos
= pos + 2;
3600
ps.
charPos
= pos + 6;
3619
ps.
charPos
= pos;
3648
ps.
charPos
= pos;
3762
ps.
charPos
= pos + 2;
3774
ps.
charPos
= pos + 2;
3791
ps.
charPos
= pos + 6;
3811
ps.
charPos
= pos + 2;
3821
ps.
charPos
= pos + 1;
4010
ps.
charPos
= pos;
4018
ps.
charPos
= pos + 1;
4024
ps.
charPos
= pos;
4035
ps.
charPos
= pos + 2;
4229
ps.
charPos
= pos + 1;
4289
ps.
charPos
= pos;
4319
ps.
charPos
= pos + 1;
4330
ps.
charPos
= pos + 2;
4351
ps.
charPos
= pos;
4441
ps.
charPos
= pos;
4452
ps.
charPos
= pos;
4461
ps.
charPos
= pos;
4490
ps.
charPos
= pos;
4679
ps.
charPos
= pos;
4693
ps.
charPos
++;
4701
ps.
charPos
= pos;
4708
ps.
charPos
= pos;
4721
ps.
charPos
++;
4738
ps.
charPos
= pos;
4763
ps.
charPos
++;
4785
ps.
charPos
++;
4903
ps.
charPos
= pos + 1;
5100
ps.
charPos
++;
5255
ps.
charPos
= pos;
5409
ps.
charPos
++;
5452
ps.
charPos
++;
5469
ps.
charPos
= endPos + 1;
5657
ps.
charPos
= nameEndPos;
5765
ps.
charPos
= pos + 2;
5796
ps.
charPos
++;
5852
ps.
charPos
= pos;
5943
ps.
charPos
= pos + 3;
5982
ps.
charPos
++;
6036
ps.
charPos
= pos;
6067
ps.
charPos
+= 8;
6112
ps.
charPos
= pos;
6129
ps.
charPos
+= 6;
6160
ps.
charPos
+= 6;
6178
ps.
charPos
++;
6193
ps.
charPos
++;
6203
ps.
charPos
++;
6233
ps.
charPos
= pos + 1;
6238
ps.
charPos
= pos;
6400
ps.
charPos
= pos + 1;
6429
ps.
charPos
= pos;
6443
ps.
charPos
= pos;
6493
ps.
charPos
= newPos - charCount;
6555
ps.
charPos
= pos;
6636
ps.
charPos
= newPos - 1;
6874
ps.
charPos
= endPos + 1;
7207
ps.
charPos
= initialPos;
7386
ps.
charPos
-= 2;
7393
ps.
charPos
-= 3;
7400
ps.
charPos
-= 3;
7531
ps.
charPos
= endPos;
7538
ps.
charPos
++;
7625
ps.
charPos
= pos;
7735
ps.
charPos
= pos;
7750
ps.
charPos
++;
7789
ps.
charPos
= pos;
7814
ps.
charPos
= pos;
7840
ps.
charPos
= pos;
7858
ps.
charPos
= pos;
System\Xml\Core\XmlTextReaderImplAsync.cs (68)
810
ps.
charPos
= initialPos;
1036
ps.
charPos
= 0;
1124
ps.
charPos
+= 5;
1147
ps.
charPos
+= 2;
1234
ps.
charPos
= nameEndPos;
1244
ps.
charPos
++;
1255
ps.
charPos
++;
1333
ps.
charPos
= pos + 1;
1394
ps.
charPos
= pos + 1;
1403
ps.
charPos
= pos + 2;
1418
ps.
charPos
= pos + 6;
1433
ps.
charPos
= pos;
1459
ps.
charPos
= pos;
1606
ps.
charPos
= pos + 2;
1615
ps.
charPos
= pos + 2;
1629
ps.
charPos
= pos + 6;
1648
ps.
charPos
= pos + 2;
1657
ps.
charPos
= pos + 1;
1845
ps.
charPos
= pos;
1862
ps.
charPos
= pos + 1;
1868
ps.
charPos
= pos;
1875
ps.
charPos
= pos + 2;
2088
ps.
charPos
= pos + 1;
2164
ps.
charPos
= pos;
2194
ps.
charPos
= pos + 1;
2205
ps.
charPos
= pos + 2;
2226
ps.
charPos
= pos;
2327
ps.
charPos
= pos;
2338
ps.
charPos
= pos;
2347
ps.
charPos
= pos;
2376
ps.
charPos
= pos;
2461
ps.
charPos
= pos;
2475
ps.
charPos
++;
2483
ps.
charPos
= pos;
2490
ps.
charPos
= pos;
2503
ps.
charPos
++;
2520
ps.
charPos
= pos;
2550
ps.
charPos
++;
2572
ps.
charPos
++;
2690
ps.
charPos
= pos + 1;
3072
ps.
charPos
++;
3278
ps.
charPos
= pos;
3459
ps.
charPos
++;
3515
ps.
charPos
++;
3534
ps.
charPos
= endPos + 1;
3648
ps.
charPos
= nameEndPos;
3782
ps.
charPos
= pos + 2;
3815
ps.
charPos
++;
3871
ps.
charPos
= pos;
3991
ps.
charPos
= pos + 3;
4032
ps.
charPos
++;
4086
ps.
charPos
= pos;
4119
ps.
charPos
+= 8;
4169
ps.
charPos
= pos;
4186
ps.
charPos
+= 6;
4217
ps.
charPos
+= 6;
4235
ps.
charPos
++;
4250
ps.
charPos
++;
4260
ps.
charPos
++;
4290
ps.
charPos
= pos + 1;
4295
ps.
charPos
= pos;
4457
ps.
charPos
= pos + 1;
4486
ps.
charPos
= pos;
4500
ps.
charPos
= pos;
4541
ps.
charPos
= newPos - charCount;
4571
ps.
charPos
= newPos - 1;
4727
ps.
charPos
= endPos + 1;
4852
ps.
charPos
= initialPos;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
80
charPos
= 0;
412 references to charPos
System.Xml (412)
System\Xml\Core\XmlTextReaderImpl.cs (238)
1442
if ( ps.charsUsed - ps.
charPos
== 0 ) { // entity value == ""
1460
if ( ps.charsUsed - ps.
charPos
== 0 && !ps.entity.IsExternal ) { // empty internal entity value
2048
stringBuilder.Append( ps.chars, ps.
charPos
, ps.charsUsed - ps.
charPos
);
2232
return ps.
charPos
;
2406
int initialPos = ps.
charPos
;
2602
Debug.Assert( ps.
charPos
== 0 && ps.charsUsed == 0 && ps.textReader == null );
2683
Debug.Assert( ps.
charPos
== 0 && ps.charsUsed == 0 && ps.stream == null );
2713
Debug.Assert( ps.
charPos
== 0 && ps.charsUsed == 0 );
2941
Debug.Assert( ps.
charPos
== 0 );
3039
Debug.Assert(ps.charsUsed >= ps.
charPos
, "The current position must be in the valid character range.");
3046
Debug.Assert(charactersInDocument >= ps.charsUsed - ps.
charPos
,
3048
charactersInDocument -= ps.charsUsed - ps.
charPos
;
3052
Debug.Assert(charactersFromEntities >= ps.charsUsed - ps.
charPos
,
3054
charactersFromEntities -= ps.charsUsed - ps.
charPos
;
3059
if ( ps.
charPos
> 0 ) {
3060
ps.bytePos += ps.encoding.GetByteCount( ps.chars, 0, ps.
charPos
);
3062
ps.charsUsed = ps.
charPos
;
3120
int copyCharsCount = ps.charsUsed - ps.
charPos
;
3122
ps.lineStartPos = ps.lineStartPos - ps.
charPos
;
3124
BlockCopyChars( ps.chars, ps.
charPos
, ps.chars, 0, copyCharsCount );
3273
while ( ps.charsUsed - ps.
charPos
< 6 ) { // minimum "<?xml "
3279
if ( !XmlConvert.StrEqual( ps.chars, ps.
charPos
, 5, XmlDeclarationBegining ) ||
3280
xmlCharType.IsNameSingleChar( ps.chars[ps.
charPos
+ 5] )
3307
if ( ps.chars[ps.
charPos
] == '?' ) {
3310
if ( ps.chars[ps.
charPos
+ 1] == '>' ) {
3349
else if ( ps.
charPos
+ 1 == ps.charsUsed ) {
3365
switch ( ps.chars[ps.
charPos
] ) {
3367
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
, "version" ) && xmlDeclState == 0 ) {
3375
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
, "encoding" ) &&
3385
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
, "standalone" ) &&
3401
sb.Append( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
);
3405
if ( ps.chars[ps.
charPos
] != '=' ) {
3407
if ( ps.chars[ps.
charPos
] != '=' ) {
3414
char quoteChar = ps.chars[ps.
charPos
];
3417
quoteChar = ps.chars[ps.
charPos
];
3430
int pos = ps.
charPos
;
3458
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, pos - ps.
charPos
, "1.0" ) ) {
3461
attr.SetValue( ps.chars, ps.
charPos
, pos - ps.
charPos
);
3466
string badVersion = new string( ps.chars, ps.
charPos
, pos - ps.
charPos
);
3471
string encName = new string( ps.chars, ps.
charPos
, pos - ps.
charPos
);
3479
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, pos - ps.
charPos
, "yes" ) ) {
3482
else if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, pos - ps.
charPos
, "no" ) ) {
3490
attr.SetValue( ps.chars, ps.
charPos
, pos - ps.
charPos
);
3498
sb.Append( chars, ps.
charPos
, pos - ps.
charPos
);
3558
int pos = ps.
charPos
;
3612
Throw( ps.
charPos
, Res.Xml_InvalidRootData );
3681
pos = ps.
charPos
;
3713
pos = ps.
charPos
;
3744
pos = ps.
charPos
;
3753
int pos = ps.
charPos
;
3849
if ( ps.charsUsed - ps.
charPos
!= 0 ) {
3897
int pos = ps.
charPos
;
3979
nameTable.Add( chars, ps.
charPos
, pos - ps.
charPos
) );
3982
int startPos = ps.
charPos
;
3993
nameTable.Add( chars, ps.
charPos
, prefixLen ),
4028
pos = ps.
charPos
;
4131
while ( ps.charsUsed - ps.
charPos
< prefLen + locLen + 1 ) {
4140
if ( !XmlConvert.StrEqual( chars, ps.
charPos
, locLen, startTagNode.localName ) ) {
4146
int colonPos = ps.
charPos
+ prefLen;
4147
if ( !XmlConvert.StrEqual( chars, ps.
charPos
, prefLen, startTagNode.prefix ) ||
4159
pos = ps.
charPos
+ nameLen;
4246
args[3] = new string( ps.chars, ps.
charPos
, endPos - ps.
charPos
);
4257
int pos = ps.
charPos
;
4348
if ( pos == ps.
charPos
) {
4443
pos = ps.
charPos
;
4454
pos = ps.
charPos
;
4488
attr.SetValue( chars, ps.
charPos
, pos - ps.
charPos
);
4494
pos = ps.
charPos
;
4520
pos = ps.
charPos
;
4677
if ( pos - ps.
charPos
> 0 ) {
4678
stringBuilder.Append( chars, ps.
charPos
, pos - ps.
charPos
);
4735
if ( pos - ps.
charPos
> 0 ) {
4736
stringBuilder.Append( chars, ps.
charPos
, pos - ps.
charPos
);
4788
pos = ps.
charPos
;
4816
pos = ps.
charPos
;
4820
pos = ps.
charPos
;
4852
if ( ps.charsUsed - ps.
charPos
> 0 ) {
4853
if ( ps.chars[ps.
charPos
] != (char)0xD ) {
4885
pos = ps.
charPos
;
5054
int pos = ps.
charPos
;
5088
if ( pos - ps.
charPos
> 0 ) {
5138
if ( pos > ps.
charPos
) {
5163
pos = ps.
charPos
;
5198
int offset = pos - ps.
charPos
;
5201
pos = ps.
charPos
+ offset;
5205
ThrowInvalidChar( ps.chars, ps.charsUsed, ps.
charPos
+ offset );
5212
if ( pos > ps.
charPos
) {
5217
if ( ps.charsUsed - ps.
charPos
> 0 ) {
5218
if ( ps.chars[ps.
charPos
] != (char)0xD && ps.chars[ps.
charPos
] != ']') {
5241
pos = ps.
charPos
;
5253
startPos = ps.
charPos
;
5380
if ( ps.chars[ps.
charPos
] == '<' || ps.charsUsed - ps.
charPos
== 0 || ZeroEndingStream( ps.
charPos
) ) {
5387
if ( ps.chars[ps.
charPos
] == '<' || ps.charsUsed - ps.
charPos
== 0 || ZeroEndingStream( ps.
charPos
) ) {
5397
if ( xmlCharType.IsCharData( ps.chars[ps.
charPos
] ) ) {
5401
ThrowInvalidChar( ps.chars, ps.charsUsed, ps.
charPos
);
5408
Debug.Assert( ps.chars[ps.
charPos
] == '&' );
5417
Debug.Assert( ps.chars[ps.
charPos
] == '&' );
5419
if ( ps.
charPos
+ 1 == ps.charsUsed ) {
5426
if ( ps.chars[ps.
charPos
+1] == '#' ) {
5468
string entityName = nameTable.Add( ps.chars, ps.
charPos
, endPos - ps.
charPos
);
5652
string target = nameTable.Add( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
);
5669
char ch = ps.chars[ps.
charPos
];
5670
Debug.Assert( ps.
charPos
< ps.charsUsed );
5672
if ( ps.charsUsed - ps.
charPos
< 2 ) {
5675
if ( ch != '?' || ps.chars[ps.
charPos
+1] != '>' ) {
5676
Throw( Res.Xml_BadNameChar, XmlException.BuildCharExceptionArgs( ps.chars, ps.charsUsed, ps.
charPos
) );
5724
if ( ps.charsUsed - ps.
charPos
< 2 ) {
5730
int pos = ps.
charPos
;
5764
outStartPos = ps.
charPos
;
5784
if ( pos - ps.
charPos
> 0 ) {
5851
outStartPos = ps.
charPos
;
5900
if ( ps.charsUsed - ps.
charPos
< 3 ) {
5907
int pos = ps.
charPos
;
5942
outStartPos = ps.
charPos
;
5970
if ( pos - ps.
charPos
> 0 ) {
6034
outStartPos = ps.
charPos
;
6048
while ( ps.charsUsed - ps.
charPos
< 8 ) {
6053
if ( !XmlConvert.StrEqual( ps.chars, ps.
charPos
, 7, "DOCTYPE" ) ) {
6056
if ( !xmlCharType.IsWhiteSpace( ps.chars[ps.
charPos
+ 7] ) ) {
6057
ThrowExpectingWhitespace( ps.
charPos
+ 7 );
6061
Throw( ps.
charPos
- 2, Res.Xml_MultipleDTDsProvided ); // position just before <!DOCTYPE
6064
Throw( ps.
charPos
- 2, Res.Xml_DtdAfterRootElement );
6118
if ( ps.chars[ps.
charPos
] == 'P' ) {
6120
while ( ps.charsUsed - ps.
charPos
< 6 ) {
6126
if ( !XmlConvert.StrEqual( ps.chars, ps.
charPos
, 6, "PUBLIC" ) ) {
6133
ThrowExpectingWhitespace( ps.
charPos
);
6141
ThrowExpectingWhitespace( ps.
charPos
);
6149
else if ( ps.chars[ps.
charPos
] == 'S' ) {
6151
while ( ps.charsUsed - ps.
charPos
< 6 ) {
6157
if ( !XmlConvert.StrEqual( ps.chars, ps.
charPos
, 6, "SYSTEM" ) ) {
6164
ThrowExpectingWhitespace( ps.
charPos
);
6172
else if ( ps.chars[ps.
charPos
] != '[' && ps.chars[ps.
charPos
] != '>' ) {
6177
if ( ps.chars[ps.
charPos
] == '[' ) {
6183
if ( ps.chars[ps.
charPos
] != '>' ) {
6187
else if ( ps.chars[ps.
charPos
] == '>' ) {
6198
char quoteChar = ps.chars[ps.
charPos
];
6214
int pos = ps.
charPos
;
6364
if ( ps.charsUsed - ps.
charPos
> 0 ) {
6365
if ( ps.chars[ps.
charPos
] != (char)0xD ) {
6376
pos = ps.
charPos
;
6381
int pos = ps.
charPos
;
6394
int tmp1 = pos - ps.
charPos
;
6397
sb.Append( chars, ps.
charPos
, tmp1 );
6424
int tmp2 = pos - ps.
charPos
;
6427
sb.Append( ps.chars, ps.
charPos
, tmp2 );
6438
int tmp3 = pos - ps.
charPos
;
6441
sb.Append( ps.chars, ps.
charPos
, tmp3 );
6448
if ( ps.charsUsed - ps.
charPos
== 0 ) {
6451
if ( ps.chars[ps.
charPos
] != (char)0xD ) {
6457
pos = ps.
charPos
;
6483
switch ( newPos = ParseNumericCharRefInline( ps.
charPos
, expand, internalSubsetBuilder, out charCount, out entityType ) ) {
6489
Debug.Assert( ps.chars[ps.
charPos
] == '&' );
6580
internalSubsetBuilder.Append( ps.chars, ps.
charPos
, pos - ps.
charPos
+ 1 );
6605
internalSubsetBuilder.Append( ps.chars, ps.
charPos
, pos - ps.
charPos
+ 1 );
6624
switch ( newPos = ParseNamedCharRefInline( ps.
charPos
, expand, internalSubsetBuilder ) ) {
6632
Debug.Assert( ps.chars[ps.
charPos
] == '&' );
6744
internalSubsetBuilder.Append( ps.chars, ps.
charPos
, pos - ps.
charPos
);
6762
int pos = ps.
charPos
+ startOffset;
6822
colonOffset = pos - ps.
charPos
;
6827
colonOffset = pos - ps.
charPos
;
6846
colonPos = ( colonOffset == -1 ) ? -1 : ps.
charPos
+ colonOffset;
6851
int offset = pos - ps.
charPos
;
6853
pos = ps.
charPos
+ offset;
6873
string entityName = nameTable.Add( ps.chars, ps.
charPos
, endPos - ps.
charPos
);
6921
string localName = nameTable.Add( ps.chars, ps.
charPos
, endNamePos - ps.
charPos
);
6926
int startPos = ps.
charPos
;
7202
int initialPos = ps.
charPos
;
7312
incReadLeftStartPos = ps.
charPos
;
7313
incReadLeftEndPos = ps.
charPos
;
7385
Debug.Assert( XmlConvert.StrEqual( ps.chars, ps.
charPos
- 2, 2, "?>" ) );
7392
Debug.Assert( XmlConvert.StrEqual( ps.chars, ps.
charPos
- 3, 3, "-->" ) );
7399
Debug.Assert( XmlConvert.StrEqual( ps.chars, ps.
charPos
- 3, 3, "]]>" ) );
7418
startPos = ps.
charPos
;
7430
startPos = ps.
charPos
;
7517
Debug.Assert( ps.
charPos
- pos == 0 );
7518
Debug.Assert( ps.
charPos
- startPos == 0);
7523
if ( XmlConvert.StrEqual( chars, ps.
charPos
+ 2, endPos - ps.
charPos
- 2, curNode.GetNameWPrefix( nameTable ) ) &&
7535
if ( ps.chars[ps.
charPos
] != '>' ) {
7545
startPos = ps.
charPos
;
7553
Debug.Assert( ps.
charPos
- pos == 0 );
7554
Debug.Assert( ps.
charPos
- startPos == 0 );
7559
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
+ 1, endPos - ps.
charPos
- 1, curNode.localName ) &&
7567
startPos = ps.
charPos
;
7665
ParseAttributeValueSlow( ps.
charPos
, ' ', curNode ); // The quote char is intentionally empty (space) because we need to parse ' and " into the attribute value
7688
int pos = ps.
charPos
;
7732
if ( pos - ps.
charPos
> 0 ) {
7733
stringBuilder.Append( chars, ps.
charPos
, pos - ps.
charPos
);
7743
if ( normalize && xmlCharType.IsWhiteSpace( chars[ps.
charPos
] ) && pos - ps.
charPos
== 1 ) {
7744
chars[ps.
charPos
] = (char)0x20; // CDATA normalization of character references in entities
7787
if ( pos - ps.
charPos
> 0 ) {
7788
stringBuilder.Append( chars, ps.
charPos
, pos - ps.
charPos
);
7807
pos = ps.
charPos
;
7812
if ( pos - ps.
charPos
> 0 ) {
7813
stringBuilder.Append( chars, ps.
charPos
, pos - ps.
charPos
);
7863
if ( ps.
charPos
== ps.charsUsed ) {
7866
if ( xmlCharType.IsNCNameSingleChar( ps.chars[ps.
charPos
] ) ) {
7867
int pos = ps.
charPos
+ 1;
7871
return new string( ps.chars, ps.
charPos
, pos - ps.
charPos
);
7874
Debug.Assert( ps.
charPos
< ps.charsUsed );
7875
return new string( ps.chars, ps.
charPos
, 1 );
System\Xml\Core\XmlTextReaderImplAsync.cs (173)
805
int initialPos = ps.
charPos
;
828
Debug.Assert( ps.
charPos
== 0 && ps.charsUsed == 0 && ps.textReader == null );
906
Debug.Assert( ps.
charPos
== 0 && ps.charsUsed == 0 && ps.stream == null );
1030
int copyCharsCount = ps.charsUsed - ps.
charPos
;
1032
ps.lineStartPos = ps.lineStartPos - ps.
charPos
;
1034
BlockCopyChars( ps.chars, ps.
charPos
, ps.chars, 0, copyCharsCount );
1105
while ( ps.charsUsed - ps.
charPos
< 6 ) { // minimum "<?xml "
1111
if ( !XmlConvert.StrEqual( ps.chars, ps.
charPos
, 5, XmlDeclarationBegining ) ||
1112
xmlCharType.IsNameSingleChar( ps.chars[ps.
charPos
+ 5] )
1139
if ( ps.chars[ps.
charPos
] == '?' ) {
1142
if ( ps.chars[ps.
charPos
+ 1] == '>' ) {
1181
else if ( ps.
charPos
+ 1 == ps.charsUsed ) {
1197
switch ( ps.chars[ps.
charPos
] ) {
1199
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
, "version" ) && xmlDeclState == 0 ) {
1207
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
, "encoding" ) &&
1217
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
, "standalone" ) &&
1233
sb.Append( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
);
1237
if ( ps.chars[ps.
charPos
] != '=' ) {
1239
if ( ps.chars[ps.
charPos
] != '=' ) {
1246
char quoteChar = ps.chars[ps.
charPos
];
1249
quoteChar = ps.chars[ps.
charPos
];
1262
int pos = ps.
charPos
;
1291
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, pos - ps.
charPos
, "1.0" ) ) {
1294
attr.SetValue( ps.chars, ps.
charPos
, pos - ps.
charPos
);
1299
string badVersion = new string( ps.chars, ps.
charPos
, pos - ps.
charPos
);
1304
string encName = new string( ps.chars, ps.
charPos
, pos - ps.
charPos
);
1312
if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, pos - ps.
charPos
, "yes" ) ) {
1315
else if ( XmlConvert.StrEqual( ps.chars, ps.
charPos
, pos - ps.
charPos
, "no" ) ) {
1323
attr.SetValue( ps.chars, ps.
charPos
, pos - ps.
charPos
);
1331
sb.Append( chars, ps.
charPos
, pos - ps.
charPos
);
1382
int pos = ps.
charPos
;
1426
Throw(ps.
charPos
, Res.Xml_InvalidRootData);
1494
int pos = ps.
charPos
;
1597
int pos = ps.
charPos
;
1680
if (ps.charsUsed - ps.
charPos
!= 0) {
1704
int pos = ps.
charPos
;
1813
nameTable.Add(chars, ps.
charPos
, pos - ps.
charPos
));
1816
int startPos = ps.
charPos
;
1827
nameTable.Add(chars, ps.
charPos
, prefixLen),
1857
int pos = ps.
charPos
;
1911
if (ps.charsUsed - ps.
charPos
< prefLen + locLen + 1) {
1930
while (ps.charsUsed - ps.
charPos
< prefLen + locLen + 1) {
1946
if (!XmlConvert.StrEqual(chars, ps.
charPos
, locLen, startTagNode.localName)) {
1952
int colonPos = ps.
charPos
+ prefLen;
1953
if (!XmlConvert.StrEqual(chars, ps.
charPos
, prefLen, startTagNode.prefix) ||
2015
pos = ps.
charPos
+ nameLen;
2120
args[3] = new string( ps.chars, ps.
charPos
, endPos - ps.
charPos
);
2131
int pos = ps.
charPos
;
2223
if ( pos == ps.
charPos
) {
2329
pos = ps.
charPos
;
2340
pos = ps.
charPos
;
2374
attr.SetValue( chars, ps.
charPos
, pos - ps.
charPos
);
2380
pos = ps.
charPos
;
2406
pos = ps.
charPos
;
2459
if ( pos - ps.
charPos
> 0 ) {
2460
stringBuilder.Append( chars, ps.
charPos
, pos - ps.
charPos
);
2517
if ( pos - ps.
charPos
> 0 ) {
2518
stringBuilder.Append( chars, ps.
charPos
, pos - ps.
charPos
);
2575
pos = ps.
charPos
;
2603
pos = ps.
charPos
;
2607
pos = ps.
charPos
;
2639
if ( ps.charsUsed - ps.
charPos
> 0 ) {
2640
if ( ps.chars[ps.
charPos
] != (char)0xD ) {
2672
pos = ps.
charPos
;
2959
Task<Tuple<int, int, int, bool>> task = ParseTextAsync(outOrChars, ps.chars, ps.
charPos
, 0, -1, outOrChars, (char)0);
3060
if (pos - ps.
charPos
> 0) {
3147
if (pos > ps.
charPos
) {
3181
pos = ps.
charPos
;
3209
int offset = pos - ps.
charPos
;
3212
pos = ps.
charPos
+ offset;
3218
ThrowInvalidChar(ps.chars, ps.charsUsed, ps.
charPos
+ offset);
3226
if (pos > ps.
charPos
) {
3233
if (ps.charsUsed - ps.
charPos
> 0) {
3234
if (ps.chars[ps.
charPos
] != (char)0xD && ps.chars[ps.
charPos
] != ']') {
3261
pos = ps.
charPos
;
3276
int startPos = ps.
charPos
;
3430
if ( ps.chars[ps.
charPos
] == '<' || ps.charsUsed - ps.
charPos
== 0 || await ZeroEndingStreamAsync( ps.
charPos
).ConfigureAwait(false) ) {
3437
if ( ps.chars[ps.
charPos
] == '<' || ps.charsUsed - ps.
charPos
== 0 || await ZeroEndingStreamAsync( ps.
charPos
).ConfigureAwait(false) ) {
3447
if ( xmlCharType.IsCharData( ps.chars[ps.
charPos
] ) ) {
3451
ThrowInvalidChar( ps.chars, ps.charsUsed, ps.
charPos
);
3458
Debug.Assert( ps.chars[ps.
charPos
] == '&' );
3469
Debug.Assert( ps.chars[ps.
charPos
] == '&' );
3471
if ( ps.
charPos
+ 1 == ps.charsUsed ) {
3478
if ( ps.chars[ps.
charPos
+1] == '#' ) {
3533
string entityName = nameTable.Add( ps.chars, ps.
charPos
, endPos - ps.
charPos
);
3643
string target = nameTable.Add( ps.chars, ps.
charPos
, nameEndPos - ps.
charPos
);
3660
char ch = ps.chars[ps.
charPos
];
3661
Debug.Assert( ps.
charPos
< ps.charsUsed );
3663
if ( ps.charsUsed - ps.
charPos
< 2 ) {
3666
if ( ch != '?' || ps.chars[ps.
charPos
+1] != '>' ) {
3667
Throw( Res.Xml_BadNameChar, XmlException.BuildCharExceptionArgs( ps.chars, ps.charsUsed, ps.
charPos
) );
3740
if ( ps.charsUsed - ps.
charPos
< 2 ) {
3746
int pos = ps.
charPos
;
3781
outStartPos = ps.
charPos
;
3803
if ( pos - ps.
charPos
> 0 ) {
3870
outStartPos = ps.
charPos
;
3948
if ( ps.charsUsed - ps.
charPos
< 3 ) {
3955
int pos = ps.
charPos
;
3990
outStartPos = ps.
charPos
;
4020
if ( pos - ps.
charPos
> 0 ) {
4084
outStartPos = ps.
charPos
;
4100
while ( ps.charsUsed - ps.
charPos
< 8 ) {
4105
if ( !XmlConvert.StrEqual( ps.chars, ps.
charPos
, 7, "DOCTYPE" ) ) {
4108
if ( !xmlCharType.IsWhiteSpace( ps.chars[ps.
charPos
+ 7] ) ) {
4109
ThrowExpectingWhitespace( ps.
charPos
+ 7 );
4113
Throw( ps.
charPos
- 2, Res.Xml_MultipleDTDsProvided ); // position just before <!DOCTYPE
4116
Throw( ps.
charPos
- 2, Res.Xml_DtdAfterRootElement );
4175
if ( ps.chars[ps.
charPos
] == 'P' ) {
4177
while ( ps.charsUsed - ps.
charPos
< 6 ) {
4183
if ( !XmlConvert.StrEqual( ps.chars, ps.
charPos
, 6, "PUBLIC" ) ) {
4190
ThrowExpectingWhitespace( ps.
charPos
);
4198
ThrowExpectingWhitespace( ps.
charPos
);
4206
else if ( ps.chars[ps.
charPos
] == 'S' ) {
4208
while ( ps.charsUsed - ps.
charPos
< 6 ) {
4214
if ( !XmlConvert.StrEqual( ps.chars, ps.
charPos
, 6, "SYSTEM" ) ) {
4221
ThrowExpectingWhitespace( ps.
charPos
);
4229
else if ( ps.chars[ps.
charPos
] != '[' && ps.chars[ps.
charPos
] != '>' ) {
4234
if ( ps.chars[ps.
charPos
] == '[' ) {
4240
if ( ps.chars[ps.
charPos
] != '>' ) {
4244
else if ( ps.chars[ps.
charPos
] == '>' ) {
4255
char quoteChar = ps.chars[ps.
charPos
];
4271
int pos = ps.
charPos
;
4421
if ( ps.charsUsed - ps.
charPos
> 0 ) {
4422
if ( ps.chars[ps.
charPos
] != (char)0xD ) {
4433
pos = ps.
charPos
;
4438
int pos = ps.
charPos
;
4451
int tmp1 = pos - ps.
charPos
;
4454
sb.Append( chars, ps.
charPos
, tmp1 );
4481
int tmp2 = pos - ps.
charPos
;
4484
sb.Append( ps.chars, ps.
charPos
, tmp2 );
4495
int tmp3 = pos - ps.
charPos
;
4498
sb.Append( ps.chars, ps.
charPos
, tmp3 );
4505
if ( ps.charsUsed - ps.
charPos
== 0 ) {
4508
if ( ps.chars[ps.
charPos
] != (char)0xD ) {
4514
pos = ps.
charPos
;
4531
switch ( newPos = ParseNumericCharRefInline( ps.
charPos
, expand, internalSubsetBuilder, out charCount, out entityType ) ) {
4537
Debug.Assert( ps.chars[ps.
charPos
] == '&' );
4559
switch ( newPos = ParseNamedCharRefInline( ps.
charPos
, expand, internalSubsetBuilder ) ) {
4567
Debug.Assert( ps.chars[ps.
charPos
] == '&' );
4595
int pos = ps.
charPos
+ startOffset;
4665
colonOffset = pos - ps.
charPos
;
4670
colonOffset = pos - ps.
charPos
;
4694
colonPos = ( colonOffset == -1 ) ? -1 : ps.
charPos
+ colonOffset;
4702
int offset = pos - ps.
charPos
;
4704
pos = ps.
charPos
+ offset;
4726
string entityName = nameTable.Add( ps.chars, ps.
charPos
, endPos - ps.
charPos
);
4847
int initialPos = ps.
charPos
;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
120
return
charPos
- lineStartPos;