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)
68charPos = 0;
397 references to charPos
System.Private.Xml (397)
System\Xml\Core\XmlTextReaderImpl.cs (229)
1508if (_ps.charsUsed - _ps.charPos == 0) 1529if (_ps.charsUsed - _ps.charPos == 0 && !_ps.entity!.IsExternal) 2191_stringBuilder.Append(_ps.chars, _ps.charPos, _ps.charsUsed - _ps.charPos); 2400return _ps.charPos; 2599int initialPos = _ps.charPos; 2842Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.textReader == null); 2917Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.stream == null); 2947Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0); 3176Debug.Assert(_ps.charPos == 0); 3288Debug.Assert(_ps.charsUsed >= _ps.charPos, "The current position must be in the valid character range."); 3296Debug.Assert(_charactersInDocument >= _ps.charsUsed - _ps.charPos, 3298_charactersInDocument -= _ps.charsUsed - _ps.charPos; 3305Debug.Assert(_charactersFromEntities >= _ps.charsUsed - _ps.charPos, 3307_charactersFromEntities -= _ps.charsUsed - _ps.charPos; 3312if (_ps.charPos > 0) 3316_ps.bytePos += _ps.encoding.GetByteCount(_ps.chars, 0, _ps.charPos); 3319_ps.charsUsed = _ps.charPos; 3392int copyCharsCount = _ps.charsUsed - _ps.charPos; 3395_ps.lineStartPos -= _ps.charPos; 3398BlockCopyChars(_ps.chars, _ps.charPos, _ps.chars, 0, copyCharsCount); 3586while (_ps.charsUsed - _ps.charPos < 6) 3594if (!_ps.chars.AsSpan(_ps.charPos).StartsWith(XmlDeclarationBeginning) || 3595XmlCharType.IsNameSingleChar(_ps.chars![_ps.charPos + 5])) 3622if (_ps.chars[_ps.charPos] == '?') 3626if (_ps.chars[_ps.charPos + 1] == '>') 3673else if (_ps.charPos + 1 == _ps.charsUsed) 3692switch (_ps.chars.AsSpan(_ps.charPos, nameEndPos - _ps.charPos)) 3733sb.Append(_ps.chars, _ps.charPos, nameEndPos - _ps.charPos); 3737if (_ps.chars[_ps.charPos] != '=') 3740if (_ps.chars[_ps.charPos] != '=') 3748char quoteChar = _ps.chars[_ps.charPos]; 3752quoteChar = _ps.chars[_ps.charPos]; 3768int pos = _ps.charPos; 3784if (_ps.chars.AsSpan(_ps.charPos).StartsWith("1.0")) 3789attr.SetValue(_ps.chars, _ps.charPos, pos - _ps.charPos); 3795string badVersion = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 3800string encName = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 3810switch (_ps.chars.AsSpan(_ps.charPos, pos - _ps.charPos)) 3826attr.SetValue(_ps.chars, _ps.charPos, pos - _ps.charPos); 3834sb.Append(chars, _ps.charPos, pos - _ps.charPos); 3894int pos = _ps.charPos; 3963Throw(_ps.charPos, SR.Xml_InvalidRootData); 4119int pos = _ps.charPos; 4236if (_ps.charsUsed - _ps.charPos != 0) 4293int pos = _ps.charPos; 4367_nameTable.Add(chars, _ps.charPos, pos - _ps.charPos)); 4371int startPos = _ps.charPos; 4384_nameTable.Add(chars, _ps.charPos, prefixLen), 4418pos = _ps.charPos; 4536while (_ps.charsUsed - _ps.charPos < prefLen + locLen + 1) 4549if (!chars.AsSpan(_ps.charPos).StartsWith(startTagNode.localName)) 4557int colonPos = _ps.charPos + prefLen; 4558if (!chars.AsSpan(_ps.charPos).StartsWith(startTagNode.prefix) || 4572pos = _ps.charPos + nameLen; 4661args[3] = new string(_ps.chars, _ps.charPos, endPos - _ps.charPos); 4674int pos = _ps.charPos; 4764if (pos == _ps.charPos) 4848pos = _ps.charPos; 4861pos = _ps.charPos; 4886string val = new string(chars, _ps.charPos, pos - _ps.charPos); 4890attr.SetValue(chars, _ps.charPos, pos - _ps.charPos); 4897pos = _ps.charPos; 4929pos = _ps.charPos; 5113if (pos - _ps.charPos > 0) 5115_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 5182if (pos - _ps.charPos > 0) 5184_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 5237pos = _ps.charPos; 5267pos = _ps.charPos; 5270pos = _ps.charPos; 5308if (_ps.charsUsed - _ps.charPos > 0) 5310if (_ps.chars[_ps.charPos] != (char)0xD) 5345pos = _ps.charPos; 5541int pos = _ps.charPos; 5571if (pos - _ps.charPos > 0) 5632if (pos > _ps.charPos) 5659pos = _ps.charPos; 5701int offset = pos - _ps.charPos; 5704pos = _ps.charPos + offset; 5709ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.charPos + offset); 5716if (pos > _ps.charPos) 5723if (_ps.charsUsed - _ps.charPos > 0) 5725if (_ps.chars[_ps.charPos] != (char)0xD && _ps.chars[_ps.charPos] != ']') 5748pos = _ps.charPos; 5761startPos = _ps.charPos; 5908if (_ps.chars[_ps.charPos] == '<' || _ps.charsUsed - _ps.charPos == 0 || ZeroEndingStream(_ps.charPos)) 5917if (_ps.chars[_ps.charPos] == '<' || _ps.charsUsed - _ps.charPos == 0 || ZeroEndingStream(_ps.charPos)) 5929if (XmlCharType.IsCharData(_ps.chars[_ps.charPos])) 5935ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.charPos); 5943Debug.Assert(_ps.chars[_ps.charPos] == '&'); 5953Debug.Assert(_ps.chars[_ps.charPos] == '&'); 5955if (_ps.charPos + 1 == _ps.charsUsed) 5964if (_ps.chars[_ps.charPos + 1] == '#') 6011string entityName = _nameTable.Add(_ps.chars, _ps.charPos, endPos - _ps.charPos); 6208string target = _nameTable.Add(_ps.chars, _ps.charPos, nameEndPos - _ps.charPos); 6229char ch = _ps.chars[_ps.charPos]; 6230Debug.Assert(_ps.charPos < _ps.charsUsed); 6233if (_ps.charsUsed - _ps.charPos < 2) 6237if (ch != '?' || _ps.chars[_ps.charPos + 1] != '>') 6239Throw(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.charPos)); 6300if (_ps.charsUsed - _ps.charPos < 2) 6309int pos = _ps.charPos; 6338outStartPos = _ps.charPos; 6362if (pos - _ps.charPos > 0) 6442outStartPos = _ps.charPos; 6504if (_ps.charsUsed - _ps.charPos < 3) 6514int pos = _ps.charPos; 6545outStartPos = _ps.charPos; 6580if (pos - _ps.charPos > 0) 6657outStartPos = _ps.charPos; 6673while (_ps.charsUsed - _ps.charPos < 8) 6681if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("DOCTYPE")) 6687if (!XmlCharType.IsWhiteSpace(_ps.chars[_ps.charPos + 7])) 6689ThrowExpectingWhitespace(_ps.charPos + 7); 6694Throw(_ps.charPos - 2, SR.Xml_MultipleDTDsProvided); // position just before <!DOCTYPE 6699Throw(_ps.charPos - 2, SR.Xml_DtdAfterRootElement); 6752if (_ps.chars[_ps.charPos] == 'P') 6755while (_ps.charsUsed - _ps.charPos < 6) 6763if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("PUBLIC")) 6772ThrowExpectingWhitespace(_ps.charPos); 6781ThrowExpectingWhitespace(_ps.charPos); 6789else if (_ps.chars[_ps.charPos] == 'S') 6792while (_ps.charsUsed - _ps.charPos < 6) 6800if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("SYSTEM")) 6809ThrowExpectingWhitespace(_ps.charPos); 6817else if (_ps.chars[_ps.charPos] != '[' && _ps.chars[_ps.charPos] != '>') 6823if (_ps.chars[_ps.charPos] == '[') 6830if (_ps.chars[_ps.charPos] != '>') 6835else if (_ps.chars[_ps.charPos] == '>') 6850char quoteChar = _ps.chars[_ps.charPos]; 6869int pos = _ps.charPos; 7041if (_ps.charsUsed - _ps.charPos > 0) 7043if (_ps.chars[_ps.charPos] != (char)0xD) 7056pos = _ps.charPos; 7062int pos = _ps.charPos; 7080int tmp1 = pos - _ps.charPos; 7085sb.Append(chars, _ps.charPos, tmp1); 7117int tmp2 = pos - _ps.charPos; 7120sb?.Append(_ps.chars, _ps.charPos, tmp2); 7130int tmp3 = pos - _ps.charPos; 7133sb?.Append(_ps.chars, _ps.charPos, tmp3); 7140if (_ps.charsUsed - _ps.charPos == 0) 7144if (_ps.chars[_ps.charPos] != (char)0xD) 7151pos = _ps.charPos; 7183switch (newPos = ParseNumericCharRefInline(_ps.charPos, expand, internalSubsetBuilder, out charCount, out entityType)) 7193Debug.Assert(_ps.chars[_ps.charPos] == '&'); 7296internalSubsetBuilder?.Append(_ps.chars, _ps.charPos, pos - _ps.charPos + 1); 7324internalSubsetBuilder?.Append(_ps.chars, _ps.charPos, pos - _ps.charPos + 1); 7344switch (newPos = ParseNamedCharRefInline(_ps.charPos, expand, internalSubsetBuilder)) 7356Debug.Assert(_ps.chars[_ps.charPos] == '&'); 7490internalSubsetBuilder?.Append(_ps.chars, _ps.charPos, pos - _ps.charPos); 7509int pos = _ps.charPos + startOffset; 7559colonOffset = pos - _ps.charPos; 7565colonOffset = pos - _ps.charPos; 7583colonPos = (colonOffset == -1) ? -1 : _ps.charPos + colonOffset; 7589int offset = pos - _ps.charPos; 7591pos = _ps.charPos + offset; 7616string entityName = _nameTable.Add(_ps.chars, _ps.charPos, endPos - _ps.charPos); 7666string localName = _nameTable.Add(_ps.chars, _ps.charPos, endNamePos - _ps.charPos); 7672int startPos = _ps.charPos; 7674if (prefixLen == _lastPrefix.Length && _ps.chars.AsSpan(_ps.charPos).StartsWith(_lastPrefix)) 8003int initialPos = _ps.charPos; 8129_incReadLeftStartPos = _ps.charPos; 8130_incReadLeftEndPos = _ps.charPos; 8223Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 2).StartsWith("?>")); 8231Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 3).StartsWith("-->")); 8239Debug.Assert(_ps.chars.AsSpan(_ps.charPos - 3).StartsWith("]]>")); 8269startPos = _ps.charPos; 8373Debug.Assert(_ps.charPos - pos == 0); 8374Debug.Assert(_ps.charPos - startPos == 0); 8379if ((endPos - _ps.charPos - 2) == checkName.Length && chars.AsSpan(_ps.charPos + 2).StartsWith(checkName) && 8393if (_ps.chars[_ps.charPos] != '>') 8405startPos = _ps.charPos; 8413Debug.Assert(_ps.charPos - pos == 0); 8414Debug.Assert(_ps.charPos - startPos == 0); 8418if (endPos - _ps.charPos - 1 == _curNode.localName.Length && _ps.chars.AsSpan(_ps.charPos + 1).StartsWith(_curNode.localName) && 8427startPos = _ps.charPos; 8541ParseAttributeValueSlow(_ps.charPos, ' ', _curNode); // The quote char is intentionally empty (space) because we need to parse ' and " into the attribute value 8567int pos = _ps.charPos; 8613if (pos - _ps.charPos > 0) 8615_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 8627if (_normalize && XmlCharType.IsWhiteSpace(chars[_ps.charPos]) && pos - _ps.charPos == 1) 8629chars[_ps.charPos] = (char)0x20; // CDATA normalization of character references in entities 8681if (pos - _ps.charPos > 0) 8683_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 8708pos = _ps.charPos; 8713if (pos - _ps.charPos > 0) 8715_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 8778if (_ps.charPos == _ps.charsUsed) 8785if (XmlCharType.IsNCNameSingleChar(_ps.chars[_ps.charPos])) 8787int pos = _ps.charPos + 1; 8792return new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 8796Debug.Assert(_ps.charPos < _ps.charsUsed); 8797return new string(_ps.chars, _ps.charPos, 1);
System\Xml\Core\XmlTextReaderImplAsync.cs (167)
847int initialPos = _ps.charPos; 868Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.textReader == null); 944Debug.Assert(_ps.charPos == 0 && _ps.charsUsed == 0 && _ps.stream == null); 1080int copyCharsCount = _ps.charsUsed - _ps.charPos; 1083_ps.lineStartPos -= _ps.charPos; 1086BlockCopyChars(_ps.chars, _ps.charPos, _ps.chars, 0, copyCharsCount); 1171while (_ps.charsUsed - _ps.charPos < 6) 1179if (!_ps.chars.AsSpan(_ps.charPos).StartsWith(XmlDeclarationBeginning) || 1180XmlCharType.IsNameSingleChar(_ps.chars[_ps.charPos + 5])) 1206if (_ps.chars[_ps.charPos] == '?') 1210if (_ps.chars[_ps.charPos + 1] == '>') 1257else if (_ps.charPos + 1 == _ps.charsUsed) 1276switch (_ps.chars.AsSpan(_ps.charPos, nameEndPos - _ps.charPos)) 1315sb.Append(_ps.chars, _ps.charPos, nameEndPos - _ps.charPos); 1319if (_ps.chars[_ps.charPos] != '=') 1322if (_ps.chars[_ps.charPos] != '=') 1330char quoteChar = _ps.chars[_ps.charPos]; 1334quoteChar = _ps.chars[_ps.charPos]; 1349int pos = _ps.charPos; 1366if (_ps.chars.AsSpan(_ps.charPos).StartsWith("1.0")) 1370attr!.SetValue(_ps.chars, _ps.charPos, pos - _ps.charPos); 1376string badVersion = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 1381string encName = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 1390switch (_ps.chars.AsSpan(_ps.charPos, pos - _ps.charPos)) 1405attr!.SetValue(_ps.chars, _ps.charPos, pos - _ps.charPos); 1413sb.Append(chars, _ps.charPos, pos - _ps.charPos); 1474int pos = _ps.charPos; 1529Throw(_ps.charPos, SR.Xml_InvalidRootData); 1612int pos = _ps.charPos; 1733int pos = _ps.charPos; 1833if (_ps.charsUsed - _ps.charPos != 0) 1858int pos = _ps.charPos; 1960_nameTable.Add(chars, _ps.charPos, pos - _ps.charPos)); 1964int startPos = _ps.charPos; 1977_nameTable.Add(chars, _ps.charPos, prefixLen), 2003int pos = _ps.charPos; 2067if (_ps.charsUsed - _ps.charPos < prefLen + locLen + 1) 2089while (_ps.charsUsed - _ps.charPos < prefLen + locLen + 1) 2108if (!chars.AsSpan(_ps.charPos).StartsWith(startTagNode.localName)) 2116int colonPos = _ps.charPos + prefLen; 2117if (!chars.AsSpan(_ps.charPos).StartsWith(startTagNode.prefix) || 2187pos = _ps.charPos + nameLen; 2294args[3] = new string(_ps.chars, _ps.charPos, endPos - _ps.charPos); 2307int pos = _ps.charPos; 2397if (pos == _ps.charPos) 2491pos = _ps.charPos; 2504pos = _ps.charPos; 2529string val = new string(chars, _ps.charPos, pos - _ps.charPos); 2533attr.SetValue(chars, _ps.charPos, pos - _ps.charPos); 2540pos = _ps.charPos; 2572pos = _ps.charPos; 2623if (pos - _ps.charPos > 0) 2625_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 2692if (pos - _ps.charPos > 0) 2694_stringBuilder.Append(chars, _ps.charPos, pos - _ps.charPos); 2753pos = _ps.charPos; 2782pos = _ps.charPos; 2785pos = _ps.charPos; 2823if (_ps.charsUsed - _ps.charPos > 0) 2825if (_ps.chars[_ps.charPos] != (char)0xD) 2861pos = _ps.charPos; 3169Task<(int, int, int, bool)> task = ParseTextAsync(outOrChars, _ps.chars, _ps.charPos, 0, -1, outOrChars); 3270if (pos - _ps.charPos > 0) 3373if (pos > _ps.charPos) 3409pos = _ps.charPos; 3441int offset = pos - _ps.charPos; 3445pos = _ps.charPos + offset; 3452ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.charPos + offset); 3460if (pos > _ps.charPos) 3469if (_ps.charsUsed - _ps.charPos > 0) 3471if (_ps.chars[_ps.charPos] != (char)0xD && _ps.chars[_ps.charPos] != ']') 3499pos = _ps.charPos; 3517int startPos = _ps.charPos; 3684if (_ps.chars[_ps.charPos] == '<' || _ps.charsUsed - _ps.charPos == 0 || await ZeroEndingStreamAsync(_ps.charPos).ConfigureAwait(false)) 3693if (_ps.chars[_ps.charPos] == '<' || _ps.charsUsed - _ps.charPos == 0 || await ZeroEndingStreamAsync(_ps.charPos).ConfigureAwait(false)) 3705if (XmlCharType.IsCharData(_ps.chars[_ps.charPos])) 3711ThrowInvalidChar(_ps.chars, _ps.charsUsed, _ps.charPos); 3718Debug.Assert(_ps.chars[_ps.charPos] == '&'); 3729Debug.Assert(_ps.chars[_ps.charPos] == '&'); 3731if (_ps.charPos + 1 == _ps.charsUsed) 3740if (_ps.chars[_ps.charPos + 1] == '#') 3795string entityName = _nameTable.Add(_ps.chars, _ps.charPos, endPos - _ps.charPos); 3912string target = _nameTable.Add(_ps.chars, _ps.charPos, nameEndPos - _ps.charPos); 3933char ch = _ps.chars[_ps.charPos]; 3934Debug.Assert(_ps.charPos < _ps.charsUsed); 3937if (_ps.charsUsed - _ps.charPos < 2) 3941if (ch != '?' || _ps.chars[_ps.charPos + 1] != '>') 3943Throw(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.charPos)); 4023if (_ps.charsUsed - _ps.charPos < 2) 4031int pos = _ps.charPos; 4061outStartPos = _ps.charPos; 4086if (pos - _ps.charPos > 0) 4166outStartPos = _ps.charPos; 4247if (_ps.charsUsed - _ps.charPos < 3) 4256int pos = _ps.charPos; 4287outStartPos = _ps.charPos; 4323if (pos - _ps.charPos > 0) 4400outStartPos = _ps.charPos; 4417while (_ps.charsUsed - _ps.charPos < 8) 4424if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("DOCTYPE")) 4428if (!XmlCharType.IsWhiteSpace(_ps.chars[_ps.charPos + 7])) 4430ThrowExpectingWhitespace(_ps.charPos + 7); 4435Throw(_ps.charPos - 2, SR.Xml_MultipleDTDsProvided); // position just before <!DOCTYPE 4439Throw(_ps.charPos - 2, SR.Xml_DtdAfterRootElement); 4497if (_ps.chars[_ps.charPos] == 'P') 4500while (_ps.charsUsed - _ps.charPos < 6) 4508if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("PUBLIC")) 4517ThrowExpectingWhitespace(_ps.charPos); 4526ThrowExpectingWhitespace(_ps.charPos); 4534else if (_ps.chars[_ps.charPos] == 'S') 4537while (_ps.charsUsed - _ps.charPos < 6) 4545if (!_ps.chars.AsSpan(_ps.charPos).StartsWith("SYSTEM")) 4554ThrowExpectingWhitespace(_ps.charPos); 4562else if (_ps.chars[_ps.charPos] != '[' && _ps.chars[_ps.charPos] != '>') 4568if (_ps.chars[_ps.charPos] == '[') 4575if (_ps.chars[_ps.charPos] != '>') 4580else if (_ps.chars[_ps.charPos] == '>') 4594char quoteChar = _ps.chars[_ps.charPos]; 4612int pos = _ps.charPos; 4784if (_ps.charsUsed - _ps.charPos > 0) 4786if (_ps.chars[_ps.charPos] != (char)0xD) 4799pos = _ps.charPos; 4805int pos = _ps.charPos; 4822int tmp1 = pos - _ps.charPos; 4827sb.Append(chars, _ps.charPos, tmp1); 4859int tmp2 = pos - _ps.charPos; 4862sb?.Append(_ps.chars, _ps.charPos, tmp2); 4872int tmp3 = pos - _ps.charPos; 4875sb?.Append(_ps.chars, _ps.charPos, tmp3); 4882if (_ps.charsUsed - _ps.charPos == 0) 4886if (_ps.chars[_ps.charPos] != (char)0xD) 4893pos = _ps.charPos; 4912switch (newPos = ParseNumericCharRefInline(_ps.charPos, expand, internalSubsetBuilder, out charCount, out entityType)) 4920Debug.Assert(_ps.chars[_ps.charPos] == '&'); 4944switch (newPos = ParseNamedCharRefInline(_ps.charPos, expand, internalSubsetBuilder)) 4954Debug.Assert(_ps.chars[_ps.charPos] == '&'); 4982int pos = _ps.charPos + startOffset; 5034colonOffset = pos - _ps.charPos; 5040colonOffset = pos - _ps.charPos; 5060colonPos = (colonOffset == -1) ? -1 : _ps.charPos + colonOffset; 5067int offset = pos - _ps.charPos; 5069pos = _ps.charPos + offset; 5093string entityName = _nameTable.Add(_ps.chars, _ps.charPos, endPos - _ps.charPos); 5212int initialPos = _ps.charPos;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
114return charPos - lineStartPos;