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