187 writes to _curPos
System.Private.Xml (187)
System\Xml\Schema\DtdParser.cs (104)
1563_curPos++; 1575_curPos += 2; 1580_curPos++; 1591_curPos++; 1602_curPos++; 1704_curPos += 9; 1720_curPos += 8; 1745_curPos += 9; 1762_curPos += 10; 1768_curPos += 3; 1774_curPos += 4; 1796_curPos += 2; 1814_curPos++; 1824_curPos += 3; 1886_curPos++; 1890_curPos++; 1904_curPos++; 1908_curPos++; 1923_curPos++; 1936_curPos++; 1946_curPos += 5; 1958_curPos += 3; 1989_curPos += 7; 2008_curPos++; 2011_curPos++; 2044_curPos++; 2053_curPos++; 2057_curPos++; 2061_curPos++; 2065_curPos++; 2079_curPos++; 2083_curPos++; 2098_curPos++; 2109_curPos++; 2130_curPos++; 2142_curPos += 5; 2161_curPos += 8; 2164_curPos += 6; 2182_curPos += 2; 2193_curPos += 5; 2198_curPos += 6; 2215_curPos += 8; 2229_curPos += 8; 2234_curPos += 7; 2259_curPos++; 2276_curPos++; 2280_curPos++; 2295_curPos++; 2299_curPos++; 2335_curPos += 9; 2347_curPos += 8; 2356_curPos += 6; 2401_curPos++; 2410_curPos++; 2419_curPos++; 2436_curPos++; 2440_curPos++; 2466_curPos += 2; 2474_curPos++; 2490_curPos++; 2498_curPos++; 2504_curPos++; 2514_curPos++; 2530_curPos = endPos; 2547_curPos = endPos; 2565_curPos = endPos; 2571_curPos++; 2596_curPos++; 2599_curPos++; 2639_curPos++; 2687_curPos++; 2746_curPos += 5; 2790_curPos++; 2813_curPos += 6; 2824_curPos += 5; 2844_curPos++; 2858_curPos++; 2867_curPos++; 2871_curPos++; 2877_curPos += 2; 2881_curPos++; 2896_curPos++; 2900_curPos += 3; 2909_curPos++; 2915_curPos += 3; 2920_curPos += 3; 2940_curPos++; 2943_curPos++; 2985_curPos++; 3009_curPos++; 3026_curPos++; 3031_curPos++; 3056_curPos = _tokenStartPos; 3059_curPos += offset; 3073_curPos++; 3091_curPos = _tokenStartPos; 3097_curPos += len; 3103_curPos += len; 3122_curPos += 6; 3141_curPos += 6; 3216_curPos = _readerAdapter.CurrentPosition; 3245_curPos++; 3459_curPos = curPos; 3467_curPos = curPos;
System\Xml\Schema\DtdParserAsync.cs (83)
1190_curPos++; 1202_curPos += 2; 1207_curPos++; 1218_curPos++; 1229_curPos++; 1331_curPos += 9; 1347_curPos += 8; 1372_curPos += 9; 1389_curPos += 10; 1395_curPos += 3; 1401_curPos += 4; 1423_curPos += 2; 1441_curPos++; 1451_curPos += 3; 1513_curPos++; 1517_curPos++; 1534_curPos++; 1544_curPos += 5; 1556_curPos += 3; 1587_curPos += 7; 1606_curPos++; 1609_curPos++; 1624_curPos++; 1645_curPos++; 1657_curPos += 5; 1676_curPos += 8; 1679_curPos += 6; 1697_curPos += 2; 1708_curPos += 5; 1713_curPos += 6; 1730_curPos += 8; 1744_curPos += 8; 1749_curPos += 7; 1796_curPos += 9; 1808_curPos += 8; 1817_curPos += 6; 1847_curPos++; 1856_curPos++; 1865_curPos++; 1882_curPos++; 1886_curPos++; 1912_curPos += 2; 1920_curPos++; 1936_curPos++; 1944_curPos++; 1950_curPos++; 1960_curPos++; 1976_curPos = endPos; 1993_curPos = endPos; 2011_curPos = endPos; 2017_curPos++; 2042_curPos++; 2045_curPos++; 2112_curPos++; 2171_curPos += 5; 2215_curPos++; 2238_curPos += 6; 2249_curPos += 5; 2272_curPos++; 2281_curPos++; 2285_curPos++; 2291_curPos += 2; 2295_curPos++; 2310_curPos++; 2314_curPos += 3; 2323_curPos++; 2329_curPos += 3; 2334_curPos += 3; 2354_curPos++; 2357_curPos++; 2399_curPos++; 2422_curPos++; 2439_curPos++; 2444_curPos++; 2469_curPos = _tokenStartPos; 2472_curPos += offset; 2486_curPos++; 2504_curPos = _tokenStartPos; 2510_curPos += len; 2516_curPos += len; 2535_curPos += 6; 2554_curPos += 6; 2575_curPos++;
719 references to _curPos
System.Private.Xml (719)
System\Xml\Schema\DtdParser.cs (385)
293ThrowInvalidChar(_curPos, systemId, i); 303ThrowInvalidChar(_curPos, publicId, i); 560Throw(_curPos - 3, SR.Xml_InvalidConditionalSection); // 3==strlen("<![") 571SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 576Throw(_curPos - 3, SR.Xml_UnexpectedCDataEnd); 584Throw(_curPos, SR.Xml_UnclosedConditionalSection); 589Debug.Assert(_curPos > 0 && _chars[_curPos - 1] == ']'); 590SaveParsingBuffer(_curPos - 1); 597ThrowUnexpectedToken(_curPos, ">"); 607Throw(_curPos, SR.Xml_ExpectDtdMarkup); 613Throw(_curPos, SR.Xml_IncompleteDtdContent); 617Throw(_curPos, SR.Xml_UnclosedConditionalSection); 631SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 637Throw(_curPos, SR.Sch_ParEntityRefNesting); 673attrDef.LinePosition = (int)LinePos - (_curPos - _tokenStartPos); 789SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_DupNotationAttribute, elementDecl.Name.ToString()); // 8 == strlen("NOTATION") 797SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_NotationAttributeOnEmptyElement, elementDecl.Name.ToString()); // 8 == strlen("NOTATION") 906SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_AttListPresence, string.Empty); 944SendValidationEvent(_curPos - name.Name.Length, XmlSeverityType.Error, SR.Sch_DupElementDecl, GetNameString()); 1007ThrowUnexpectedToken(_curPos, ">"); 1059Throw(_curPos, SR.Xml_InvalidContentModel); 1071Throw(_curPos, SR.Xml_InvalidContentModel); 1079Throw(_curPos, SR.Xml_InvalidContentModel); 1088SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1093Throw(_curPos, SR.Xml_InvalidContentModel); 1150SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1158ThrowUnexpectedToken(_curPos, "*"); 1175SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1196SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1263ThrowUnexpectedToken(_curPos - 5, ">"); // 5 == strlen("NDATA") 1267Throw(_curPos - 5, SR.Xml_ExpectingWhiteSpace, "NDATA"); 1323SendValidationEvent(_curPos - notationName.Name.Length, XmlSeverityType.Error, SR.Sch_DupNotation, notationName.Name); 1423SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1448SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1457SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1474ThrowUnexpectedToken(_curPos, "\"", "'"); 1483Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId }); 1501ThrowInvalidChar(_curPos - 1 - publicId.Length + i, publicId, i); 1521ThrowUnexpectedToken(_curPos, "\"", "'"); 1536ThrowUnexpectedToken(_curPos, "\"", "'"); 1549switch (_chars[_curPos]) 1552if (_curPos == _charsUsed) 1558ThrowInvalidChar(_chars, _charsUsed, _curPos); 1564_readerAdapter.OnNewLine(_curPos); 1568if (_chars[_curPos + 1] == (char)0xA) 1577else if (_curPos + 1 < _charsUsed || _readerAdapter.IsEof) 1579_chars[_curPos] = (char)0xA; // EOL normalization of 0xD 1586_readerAdapter.OnNewLine(_curPos); 1594if (_charsUsed - _curPos < 2) 1598if (!XmlCharType.IsWhiteSpace(_chars[_curPos + 1])) 1614Throw(_curPos, SR.Xml_ExpectingWhiteSpace, ParseUnexpectedToken(_curPos)); 1616_tokenStartPos = _curPos; 1673Throw(_curPos, SR.Xml_IncompleteDtdContent); 1683switch (_chars[_curPos]) 1686switch (_chars[_curPos + 1]) 1689switch (_chars[_curPos + 2]) 1692if (_chars[_curPos + 3] == 'L') 1694if (_charsUsed - _curPos < 9) 1698if (_chars[_curPos + 4] != 'E' || _chars[_curPos + 5] != 'M' || 1699_chars[_curPos + 6] != 'E' || _chars[_curPos + 7] != 'N' || 1700_chars[_curPos + 8] != 'T') 1702Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1709else if (_chars[_curPos + 3] == 'N') 1711if (_charsUsed - _curPos < 8) 1715if (_chars[_curPos + 4] != 'T' || _chars[_curPos + 5] != 'I' || 1716_chars[_curPos + 6] != 'T' || _chars[_curPos + 7] != 'Y') 1718Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1726if (_charsUsed - _curPos < 4) 1730Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1735if (_charsUsed - _curPos < 9) 1739if (_chars[_curPos + 3] != 'T' || _chars[_curPos + 4] != 'T' || 1740_chars[_curPos + 5] != 'L' || _chars[_curPos + 6] != 'I' || 1741_chars[_curPos + 7] != 'S' || _chars[_curPos + 8] != 'T') 1743Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1751if (_charsUsed - _curPos < 10) 1755if (_chars[_curPos + 3] != 'O' || _chars[_curPos + 4] != 'T' || 1756_chars[_curPos + 5] != 'A' || _chars[_curPos + 6] != 'T' || 1757_chars[_curPos + 7] != 'I' || _chars[_curPos + 8] != 'O' || 1758_chars[_curPos + 9] != 'N') 1760Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1772if (_chars[_curPos + 3] == '-') 1779if (_charsUsed - _curPos < 4) 1783Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1787if (_charsUsed - _curPos < 3) 1791Throw(_curPos + 2, SR.Xml_ExpectDtdMarkup); 1799if (_charsUsed - _curPos < 2) 1803Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1808if (_charsUsed - _curPos < 2 && !_readerAdapter.IsEof) 1812if (_chars[_curPos + 1] != ']') 1818if (_charsUsed - _curPos < 3 && !_readerAdapter.IsEof) 1822if (_chars[_curPos + 1] == ']' && _chars[_curPos + 2] == '>') 1829if (_charsUsed - _curPos == 0) 1833Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1867switch (_chars[_curPos]) 1872Throw(_curPos, SR.Xml_ExpectExternalOrClose); 1880Throw(_curPos, SR.Xml_ExpectExternalOrClose); 1894Throw(_curPos, SR.Xml_ExpectExternalOrClose); 1901switch (_chars[_curPos]) 1912Throw(_curPos, SR.Xml_ExpectSubOrClose); 1919if (_chars[_curPos] != '>') 1921ThrowUnexpectedToken(_curPos, ">"); 1932switch (_chars[_curPos]) 1939if (_charsUsed - _curPos < 5) 1943if (_chars[_curPos + 1] == 'M' && _chars[_curPos + 2] == 'P' && 1944_chars[_curPos + 3] == 'T' && _chars[_curPos + 4] == 'Y') 1952if (_charsUsed - _curPos < 3) 1956if (_chars[_curPos + 1] == 'N' && _chars[_curPos + 2] == 'Y') 1964Throw(_curPos, SR.Xml_InvalidContentModel); 1970Throw(_curPos, SR.Xml_IncompleteDtdContent); 1977if (_chars[_curPos] == '#') 1979while (_charsUsed - _curPos < 7) 1983Throw(_curPos, SR.Xml_IncompleteDtdContent); 1987if (_chars.AsSpan(_curPos + 1).StartsWith("PCDATA")) 1995Throw(_curPos + 1, SR.Xml_ExpectPcData); 2005switch (_chars[_curPos]) 2026switch (_chars[_curPos]) 2042Throw(_curPos, SR.Xml_ExpectNoWhitespace); 2050switch (_chars[_curPos]) 2069Throw(_curPos, SR.Xml_ExpectOp); 2076switch (_chars[_curPos]) 2088ThrowUnexpectedToken(_curPos, ")", "|"); 2096if (_chars[_curPos] == '*' && !_whitespaceSeen) 2106switch (_chars[_curPos]) 2115Throw(_curPos, SR.Xml_ExpectingWhiteSpace, ParseUnexpectedToken(_curPos)); 2127switch (_chars[_curPos]) 2135if (_charsUsed - _curPos < 5) 2137if (_chars[_curPos + 1] != 'D' || _chars[_curPos + 2] != 'A' || 2138_chars[_curPos + 3] != 'T' || _chars[_curPos + 4] != 'A') 2140Throw(_curPos, SR.Xml_InvalidAttributeType1); 2146if (_charsUsed - _curPos < 9) 2149if (_chars[_curPos + 1] != 'N' || _chars[_curPos + 2] != 'T' || 2150_chars[_curPos + 3] != 'I' || _chars[_curPos + 4] != 'T') 2152Throw(_curPos, SR.Xml_InvalidAttributeType); 2154switch (_chars[_curPos + 5]) 2157if (_chars[_curPos + 6] != 'E' || _chars[_curPos + 7] != 'S') 2159Throw(_curPos, SR.Xml_InvalidAttributeType); 2167Throw(_curPos, SR.Xml_InvalidAttributeType); 2172if (_charsUsed - _curPos < 6) 2175if (_chars[_curPos + 1] != 'D') 2177Throw(_curPos, SR.Xml_InvalidAttributeType); 2180if (_chars[_curPos + 2] != 'R') 2186if (_chars[_curPos + 3] != 'E' || _chars[_curPos + 4] != 'F') 2188Throw(_curPos, SR.Xml_InvalidAttributeType); 2191if (_chars[_curPos + 5] != 'S') 2202if (_charsUsed - _curPos < 8 && !_readerAdapter.IsEof) 2206switch (_chars[_curPos + 1]) 2209if (_chars[_curPos + 2] != 'T' || _chars[_curPos + 3] != 'A' || 2210_chars[_curPos + 4] != 'T' || _chars[_curPos + 5] != 'I' || 2211_chars[_curPos + 6] != 'O' || _chars[_curPos + 7] != 'N') 2213Throw(_curPos, SR.Xml_InvalidAttributeType); 2219if (_chars[_curPos + 2] != 'T' || _chars[_curPos + 3] != 'O' || 2220_chars[_curPos + 4] != 'K' || _chars[_curPos + 5] != 'E' || 2221_chars[_curPos + 6] != 'N') 2223Throw(_curPos, SR.Xml_InvalidAttributeType); 2227if (_chars[_curPos + 7] == 'S') 2238Throw(_curPos, SR.Xml_InvalidAttributeType); 2243Throw(_curPos, SR.Xml_InvalidAttributeType); 2250Throw(_curPos, SR.Xml_IncompleteDtdContent); 2257if (_chars[_curPos] == '(') 2266ThrowUnexpectedToken(_curPos, "("); 2273switch (_chars[_curPos]) 2285ThrowUnexpectedToken(_curPos, ")", "|"); 2292switch (_chars[_curPos]) 2304ThrowUnexpectedToken(_curPos, ")", "|"); 2313switch (_chars[_curPos]) 2321if (_charsUsed - _curPos < 6) 2323switch (_chars[_curPos + 1]) 2326if (_charsUsed - _curPos < 9) 2328if (_chars[_curPos + 2] != 'E' || _chars[_curPos + 3] != 'Q' || 2329_chars[_curPos + 4] != 'U' || _chars[_curPos + 5] != 'I' || 2330_chars[_curPos + 6] != 'R' || _chars[_curPos + 7] != 'E' || 2331_chars[_curPos + 8] != 'D') 2333Throw(_curPos, SR.Xml_ExpectAttType); 2339if (_charsUsed - _curPos < 8) 2341if (_chars[_curPos + 2] != 'M' || _chars[_curPos + 3] != 'P' || 2342_chars[_curPos + 4] != 'L' || _chars[_curPos + 5] != 'I' || 2343_chars[_curPos + 6] != 'E' || _chars[_curPos + 7] != 'D') 2345Throw(_curPos, SR.Xml_ExpectAttType); 2351if (_chars[_curPos + 2] != 'I' || _chars[_curPos + 3] != 'X' || 2352_chars[_curPos + 4] != 'E' || _chars[_curPos + 5] != 'D') 2354Throw(_curPos, SR.Xml_ExpectAttType); 2360Throw(_curPos, SR.Xml_ExpectAttType); 2365Throw(_curPos, SR.Xml_ExpectAttType); 2371Throw(_curPos, SR.Xml_IncompleteDtdContent); 2378switch (_chars[_curPos]) 2386ThrowUnexpectedToken(_curPos, "\"", "'"); 2393Debug.Assert(_chars[_curPos] == '"' || _chars[_curPos] == '\''); 2395char quoteChar = _chars[_curPos]; 2402_tokenStartPos = _curPos; 2408while (XmlCharType.IsAttributeValueChar(_chars[_curPos]) && _chars[_curPos] != '%') 2413if (_chars[_curPos] == quoteChar && _currentEntityId == startQuoteEntityId) 2417_stringBuilder.Append(_chars, _tokenStartPos, _curPos - _tokenStartPos); 2424int tmp1 = _curPos - _tokenStartPos; 2428_tokenStartPos = _curPos; 2431switch (_chars[_curPos]) 2444_tokenStartPos = _curPos; 2446_readerAdapter.OnNewLine(_curPos); 2449if (_chars[_curPos + 1] == (char)0xA) 2461_tokenStartPos = _curPos + 2; 2468else if (_curPos + 1 == _charsUsed) 2478_tokenStartPos = _curPos; // For entities: EOL normalization of 0xD and 0xD 0xA 2481_readerAdapter.OnNewLine(_curPos); 2496Throw(_curPos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0')); 2508_tokenStartPos = _curPos; 2517if (_curPos + 1 == _charsUsed) 2522if (_chars[_curPos + 1] == '#') 2527_stringBuilder.Append(_chars, _curPos, endPos - _curPos); 2544_stringBuilder.Append(_chars, _curPos, endPos - _curPos); 2553_tokenStartPos = _curPos; 2564_tokenStartPos = _curPos; 2572_tokenStartPos = _curPos; 2582if (_curPos == _charsUsed) 2589char ch = _chars[_curPos]; 2592if (_curPos + 1 == _charsUsed) 2597if (XmlCharType.IsLowSurrogate(_chars[_curPos])) 2603ThrowInvalidChar(_chars, _charsUsed, _curPos); 2609Debug.Assert(_curPos - _tokenStartPos == 0); 2616Throw(_curPos, SR.Xml_UnclosedQuote); 2619_tokenStartPos = _curPos; 2634if (_chars[_curPos] != ';') 2636ThrowUnexpectedToken(_curPos, ";"); 2646switch (_chars[_curPos]) 2651Throw(_curPos, SR.Xml_ExpectExternalOrClose); 2659Throw(_curPos, SR.Xml_ExpectExternalOrClose); 2665Throw(_curPos, SR.Xml_ExpectExternalOrPublicId); 2672if (_chars[_curPos] != '"' && _chars[_curPos] != '\'') 2674ThrowUnexpectedToken(_curPos, "\"", "'"); 2685if (_chars[_curPos] == '%') 2702switch (_chars[_curPos]) 2707Throw(_curPos, SR.Xml_ExpectExternalOrClose); 2715Throw(_curPos, SR.Xml_ExpectExternalOrClose); 2727Throw(_curPos, SR.Xml_ExpectExternalIdOrEntityValue); 2734if (_chars[_curPos] == 'N') 2736while (_charsUsed - _curPos < 5) 2743if (_chars[_curPos + 1] == 'D' && _chars[_curPos + 2] == 'A' && 2744_chars[_curPos + 3] == 'T' && _chars[_curPos + 4] == 'A') 2759if (_chars[_curPos] != '"' && _chars[_curPos] != '\'') 2761ThrowUnexpectedToken(_curPos, "\"", "'"); 2772if (_chars[_curPos] != '"' && _chars[_curPos] != '\'') 2786if (_chars[_curPos] != 'I') 2788Throw(_curPos, SR.Xml_ExpectIgnoreOrInclude); 2794if (_charsUsed - _curPos < 5) 2798switch (_chars[_curPos]) 2801if (_charsUsed - _curPos < 6) 2805if (_chars[_curPos + 1] != 'C' || _chars[_curPos + 2] != 'L' || 2806_chars[_curPos + 3] != 'U' || _chars[_curPos + 4] != 'D' || 2807_chars[_curPos + 5] != 'E' || XmlCharType.IsNameSingleChar(_chars[_curPos + 6])) 2816if (_chars[_curPos + 1] != 'N' || _chars[_curPos + 2] != 'O' || 2817_chars[_curPos + 3] != 'R' || _chars[_curPos + 4] != 'E' || 2818XmlCharType.IsNameSingleChar(_chars[_curPos + 5])) 2827Throw(_curPos - 1, SR.Xml_ExpectIgnoreOrInclude); 2833Throw(_curPos, SR.Xml_IncompleteDtdContent); 2840if (_chars[_curPos] != '[') 2842ThrowUnexpectedToken(_curPos, "["); 2856while (XmlCharType.IsTextChar(_chars[_curPos]) && _chars[_curPos] != ']') 2861switch (_chars[_curPos]) 2872_readerAdapter.OnNewLine(_curPos); 2875if (_chars[_curPos + 1] == (char)0xA) 2879else if (_curPos + 1 < _charsUsed || _readerAdapter.IsEof) 2887_readerAdapter.OnNewLine(_curPos); 2890if (_charsUsed - _curPos < 3) 2894if (_chars[_curPos + 1] != '!' || _chars[_curPos + 2] != '[') 2903if (_charsUsed - _curPos < 3) 2907if (_chars[_curPos + 1] != ']' || _chars[_curPos + 2] != '>') 2926if (_curPos == _charsUsed) 2933char ch = _chars[_curPos]; 2936if (_curPos + 1 == _charsUsed) 2941if (XmlCharType.IsLowSurrogate(_chars[_curPos])) 2947ThrowInvalidChar(_chars, _charsUsed, _curPos); 2960Throw(_curPos, SR.Xml_UnclosedConditionalSection); 2962_tokenStartPos = _curPos; 2978_tokenStartPos = _curPos; 2983if (XmlCharType.IsStartNCNameSingleChar(_chars[_curPos]) || _chars[_curPos] == ':') 2989if (_curPos + 1 >= _charsUsed) 2995Throw(_curPos, SR.Xml_UnexpectedEOF, "Name"); 2999Throw(_curPos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos)); 3007if (XmlCharType.IsNCNameSingleChar(_chars[_curPos])) 3017if (_chars[_curPos] == ':') 3023Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0')); 3025colonOffset = _curPos - _tokenStartPos; 3036else if (_curPos == _charsUsed) 3042if (_tokenStartPos == _curPos) 3044Throw(_curPos, SR.Xml_UnexpectedEOF, "Name"); 3055int offset = _curPos - _tokenStartPos; 3058_tokenStartPos = _curPos; 3065_tokenStartPos = _curPos; 3071if (XmlCharType.IsNCNameSingleChar(_chars[_curPos]) || _chars[_curPos] == ':') 3081if (_curPos < _charsUsed) 3083if (_curPos - _tokenStartPos == 0) 3085Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos)); 3090int len = _curPos - _tokenStartPos; 3096_tokenStartPos = _curPos; 3100Throw(_curPos, SR.Xml_UnexpectedEOF, "NmToken"); 3102_tokenStartPos = _curPos; 3109Debug.Assert(_chars[_curPos] == 'P'); 3110while (_charsUsed - _curPos < 6) 3118if (!_chars.AsSpan(_curPos + 1).StartsWith("UBLIC")) 3128Debug.Assert(_chars[_curPos] == 'S'); 3129while (_charsUsed - _curPos < 6) 3137if (!_chars.AsSpan(_curPos + 1).StartsWith("YSTEM")) 3150Debug.Assert(_curPos - _tokenStartPos > 0); 3153return new XmlQualifiedName(_nameTable.Add(_chars, _tokenStartPos, _curPos - _tokenStartPos)); 3159return new XmlQualifiedName(_nameTable.Add(_chars, _colonPos + 1, _curPos - _colonPos - 1), 3172Debug.Assert(_curPos - _tokenStartPos > 0); 3173return new string(_chars, _tokenStartPos, _curPos - _tokenStartPos); 3185return new string(_chars, _tokenStartPos, _curPos - _tokenStartPos - 1); 3195Debug.Assert(_curPos == 0 || _chars[_curPos - 1] == '"' || _chars[_curPos - 1] == '\''); 3197string val = (_stringBuilder.Length == 0) ? new string(_chars, _tokenStartPos, _curPos - _tokenStartPos - 1) : _stringBuilder.ToString(); 3221SaveParsingBuffer(_curPos); 3236_readerAdapter.CurrentPosition = _curPos; 3244Debug.Assert(_chars[_curPos] == '&' || _chars[_curPos] == '%'); 3252Debug.Assert(_chars[_curPos - 1] == ';'); 3257Throw(_curPos - entityName.Name.Length - 1, SR.Xml_InvalidParEntityRef); 3267Throw(_curPos - entityName.Name.Length - 1, paramEntity ? SR.Xml_RecursiveParEntity : SR.Xml_RecursiveGenEntity, entityName.Name); 3342Debug.Assert(_chars[_curPos - 1] == ';'); 3360SendValidationEvent(_curPos - entityName.Name.Length - 1, XmlSeverityType.Error, SR.Xml_UndeclaredParEntity, entityName.Name); 3369SendValidationEvent(_curPos - entityName.Name.Length - 1, XmlSeverityType.Error, SR.Xml_UndeclaredEntity, entityName.Name); 3374Throw(_curPos - entityName.Name.Length - 1, SR.Xml_UndeclaredEntity, entityName.Name); 3382Throw(_curPos - entityName.Name.Length - 1, SR.Xml_UnparsedEntityRef, entityName.Name); 3387Throw(_curPos - entityName.Name.Length - 1, SR.Xml_ExternalEntityInAttValue, entityName.Name); 3399SendValidationEvent(severity, new XmlSchemaException(code, arg, BaseUriStr, (int)LineNo, (int)LinePos + (pos - _curPos))); 3432return _curPos - _readerAdapter.LineStartPosition; 3448Throw(_curPos, SR.Xml_InternalError); 3499Throw(_curPos, SR.Xml_UnexpectedTokens2, new string[3] { unexpectedToken, expectedToken1, expectedToken2 }); 3503Throw(_curPos, SR.Xml_UnexpectedTokenEx, new string[2] { unexpectedToken, expectedToken1 });
System\Xml\Schema\DtdParserAsync.cs (334)
204Throw(_curPos - 3, SR.Xml_InvalidConditionalSection); // 3==strlen("<![") 215SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 220Throw(_curPos - 3, SR.Xml_UnexpectedCDataEnd); 228Throw(_curPos, SR.Xml_UnclosedConditionalSection); 233Debug.Assert(_curPos > 0 && _chars[_curPos - 1] == ']'); 234SaveParsingBuffer(_curPos - 1); 241ThrowUnexpectedToken(_curPos, ">"); 251Throw(_curPos, SR.Xml_ExpectDtdMarkup); 257Throw(_curPos, SR.Xml_IncompleteDtdContent); 261Throw(_curPos, SR.Xml_UnclosedConditionalSection); 275SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 281Throw(_curPos, SR.Sch_ParEntityRefNesting); 317attrDef.LinePosition = (int)LinePos - (_curPos - _tokenStartPos); 433SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_DupNotationAttribute, elementDecl.Name.ToString()); // 8 == strlen("NOTATION") 441SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_NotationAttributeOnEmptyElement, elementDecl.Name.ToString()); // 8 == strlen("NOTATION") 550SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_AttListPresence, string.Empty); 588SendValidationEvent(_curPos - name.Name.Length, XmlSeverityType.Error, SR.Sch_DupElementDecl, GetNameString()); 651ThrowUnexpectedToken(_curPos, ">"); 690Throw(_curPos, SR.Xml_InvalidContentModel); 702Throw(_curPos, SR.Xml_InvalidContentModel); 710Throw(_curPos, SR.Xml_InvalidContentModel); 719SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 724Throw(_curPos, SR.Xml_InvalidContentModel); 781SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 789ThrowUnexpectedToken(_curPos, "*"); 806SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 827SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 896ThrowUnexpectedToken(_curPos - 5, ">"); // 5 == strlen("NDATA") 900Throw(_curPos - 5, SR.Xml_ExpectingWhiteSpace, "NDATA"); 957SendValidationEvent(_curPos - notationName.Name.Length, XmlSeverityType.Error, SR.Sch_DupNotation, notationName.Name); 1045SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1070SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1079SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty); 1099ThrowUnexpectedToken(_curPos, "\"", "'"); 1108Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId }); 1126ThrowInvalidChar(_curPos - 1 - publicId.Length + i, publicId, i); 1146ThrowUnexpectedToken(_curPos, "\"", "'"); 1161ThrowUnexpectedToken(_curPos, "\"", "'"); 1176switch (_chars[_curPos]) 1179if (_curPos == _charsUsed) 1185ThrowInvalidChar(_chars, _charsUsed, _curPos); 1191_readerAdapter.OnNewLine(_curPos); 1195if (_chars[_curPos + 1] == (char)0xA) 1204else if (_curPos + 1 < _charsUsed || _readerAdapter.IsEof) 1206_chars[_curPos] = (char)0xA; // EOL normalization of 0xD 1213_readerAdapter.OnNewLine(_curPos); 1221if (_charsUsed - _curPos < 2) 1225if (!XmlCharType.IsWhiteSpace(_chars[_curPos + 1])) 1241Throw(_curPos, SR.Xml_ExpectingWhiteSpace, ParseUnexpectedToken(_curPos)); 1243_tokenStartPos = _curPos; 1300Throw(_curPos, SR.Xml_IncompleteDtdContent); 1310switch (_chars[_curPos]) 1313switch (_chars[_curPos + 1]) 1316switch (_chars[_curPos + 2]) 1319if (_chars[_curPos + 3] == 'L') 1321if (_charsUsed - _curPos < 9) 1325if (_chars[_curPos + 4] != 'E' || _chars[_curPos + 5] != 'M' || 1326_chars[_curPos + 6] != 'E' || _chars[_curPos + 7] != 'N' || 1327_chars[_curPos + 8] != 'T') 1329Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1336else if (_chars[_curPos + 3] == 'N') 1338if (_charsUsed - _curPos < 8) 1342if (_chars[_curPos + 4] != 'T' || _chars[_curPos + 5] != 'I' || 1343_chars[_curPos + 6] != 'T' || _chars[_curPos + 7] != 'Y') 1345Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1353if (_charsUsed - _curPos < 4) 1357Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1362if (_charsUsed - _curPos < 9) 1366if (_chars[_curPos + 3] != 'T' || _chars[_curPos + 4] != 'T' || 1367_chars[_curPos + 5] != 'L' || _chars[_curPos + 6] != 'I' || 1368_chars[_curPos + 7] != 'S' || _chars[_curPos + 8] != 'T') 1370Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1378if (_charsUsed - _curPos < 10) 1382if (_chars[_curPos + 3] != 'O' || _chars[_curPos + 4] != 'T' || 1383_chars[_curPos + 5] != 'A' || _chars[_curPos + 6] != 'T' || 1384_chars[_curPos + 7] != 'I' || _chars[_curPos + 8] != 'O' || 1385_chars[_curPos + 9] != 'N') 1387Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1399if (_chars[_curPos + 3] == '-') 1406if (_charsUsed - _curPos < 4) 1410Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1414if (_charsUsed - _curPos < 3) 1418Throw(_curPos + 2, SR.Xml_ExpectDtdMarkup); 1426if (_charsUsed - _curPos < 2) 1430Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1435if (_charsUsed - _curPos < 2 && !_readerAdapter.IsEof) 1439if (_chars[_curPos + 1] != ']') 1445if (_charsUsed - _curPos < 3 && !_readerAdapter.IsEof) 1449if (_chars[_curPos + 1] == ']' && _chars[_curPos + 2] == '>') 1456if (_charsUsed - _curPos == 0) 1460Throw(_curPos, SR.Xml_ExpectDtdMarkup); 1494switch (_chars[_curPos]) 1499Throw(_curPos, SR.Xml_ExpectExternalOrClose); 1507Throw(_curPos, SR.Xml_ExpectExternalOrClose); 1521Throw(_curPos, SR.Xml_ExpectExternalOrClose); 1530switch (_chars[_curPos]) 1537if (_charsUsed - _curPos < 5) 1541if (_chars[_curPos + 1] == 'M' && _chars[_curPos + 2] == 'P' && 1542_chars[_curPos + 3] == 'T' && _chars[_curPos + 4] == 'Y') 1550if (_charsUsed - _curPos < 3) 1554if (_chars[_curPos + 1] == 'N' && _chars[_curPos + 2] == 'Y') 1562Throw(_curPos, SR.Xml_InvalidContentModel); 1568Throw(_curPos, SR.Xml_IncompleteDtdContent); 1575if (_chars[_curPos] == '#') 1577while (_charsUsed - _curPos < 7) 1581Throw(_curPos, SR.Xml_IncompleteDtdContent); 1585if (_chars.AsSpan(_curPos + 1).StartsWith("PCDATA")) 1593Throw(_curPos + 1, SR.Xml_ExpectPcData); 1603switch (_chars[_curPos]) 1621switch (_chars[_curPos]) 1630Throw(_curPos, SR.Xml_ExpectingWhiteSpace, ParseUnexpectedToken(_curPos)); 1642switch (_chars[_curPos]) 1650if (_charsUsed - _curPos < 5) 1652if (_chars[_curPos + 1] != 'D' || _chars[_curPos + 2] != 'A' || 1653_chars[_curPos + 3] != 'T' || _chars[_curPos + 4] != 'A') 1655Throw(_curPos, SR.Xml_InvalidAttributeType1); 1661if (_charsUsed - _curPos < 9) 1664if (_chars[_curPos + 1] != 'N' || _chars[_curPos + 2] != 'T' || 1665_chars[_curPos + 3] != 'I' || _chars[_curPos + 4] != 'T') 1667Throw(_curPos, SR.Xml_InvalidAttributeType); 1669switch (_chars[_curPos + 5]) 1672if (_chars[_curPos + 6] != 'E' || _chars[_curPos + 7] != 'S') 1674Throw(_curPos, SR.Xml_InvalidAttributeType); 1682Throw(_curPos, SR.Xml_InvalidAttributeType); 1687if (_charsUsed - _curPos < 6) 1690if (_chars[_curPos + 1] != 'D') 1692Throw(_curPos, SR.Xml_InvalidAttributeType); 1695if (_chars[_curPos + 2] != 'R') 1701if (_chars[_curPos + 3] != 'E' || _chars[_curPos + 4] != 'F') 1703Throw(_curPos, SR.Xml_InvalidAttributeType); 1706if (_chars[_curPos + 5] != 'S') 1717if (_charsUsed - _curPos < 8 && !_readerAdapter.IsEof) 1721switch (_chars[_curPos + 1]) 1724if (_chars[_curPos + 2] != 'T' || _chars[_curPos + 3] != 'A' || 1725_chars[_curPos + 4] != 'T' || _chars[_curPos + 5] != 'I' || 1726_chars[_curPos + 6] != 'O' || _chars[_curPos + 7] != 'N') 1728Throw(_curPos, SR.Xml_InvalidAttributeType); 1734if (_chars[_curPos + 2] != 'T' || _chars[_curPos + 3] != 'O' || 1735_chars[_curPos + 4] != 'K' || _chars[_curPos + 5] != 'E' || 1736_chars[_curPos + 6] != 'N') 1738Throw(_curPos, SR.Xml_InvalidAttributeType); 1742if (_chars[_curPos + 7] == 'S') 1753Throw(_curPos, SR.Xml_InvalidAttributeType); 1758Throw(_curPos, SR.Xml_InvalidAttributeType); 1765Throw(_curPos, SR.Xml_IncompleteDtdContent); 1774switch (_chars[_curPos]) 1782if (_charsUsed - _curPos < 6) 1784switch (_chars[_curPos + 1]) 1787if (_charsUsed - _curPos < 9) 1789if (_chars[_curPos + 2] != 'E' || _chars[_curPos + 3] != 'Q' || 1790_chars[_curPos + 4] != 'U' || _chars[_curPos + 5] != 'I' || 1791_chars[_curPos + 6] != 'R' || _chars[_curPos + 7] != 'E' || 1792_chars[_curPos + 8] != 'D') 1794Throw(_curPos, SR.Xml_ExpectAttType); 1800if (_charsUsed - _curPos < 8) 1802if (_chars[_curPos + 2] != 'M' || _chars[_curPos + 3] != 'P' || 1803_chars[_curPos + 4] != 'L' || _chars[_curPos + 5] != 'I' || 1804_chars[_curPos + 6] != 'E' || _chars[_curPos + 7] != 'D') 1806Throw(_curPos, SR.Xml_ExpectAttType); 1812if (_chars[_curPos + 2] != 'I' || _chars[_curPos + 3] != 'X' || 1813_chars[_curPos + 4] != 'E' || _chars[_curPos + 5] != 'D') 1815Throw(_curPos, SR.Xml_ExpectAttType); 1821Throw(_curPos, SR.Xml_ExpectAttType); 1826Throw(_curPos, SR.Xml_ExpectAttType); 1832Throw(_curPos, SR.Xml_IncompleteDtdContent); 1839Debug.Assert(_chars[_curPos] == '"' || _chars[_curPos] == '\''); 1841char quoteChar = _chars[_curPos]; 1848_tokenStartPos = _curPos; 1854while (XmlCharType.IsAttributeValueChar(_chars[_curPos]) && _chars[_curPos] != '%') 1859if (_chars[_curPos] == quoteChar && _currentEntityId == startQuoteEntityId) 1863_stringBuilder.Append(_chars, _tokenStartPos, _curPos - _tokenStartPos); 1870int tmp1 = _curPos - _tokenStartPos; 1874_tokenStartPos = _curPos; 1877switch (_chars[_curPos]) 1890_tokenStartPos = _curPos; 1892_readerAdapter.OnNewLine(_curPos); 1895if (_chars[_curPos + 1] == (char)0xA) 1907_tokenStartPos = _curPos + 2; 1914else if (_curPos + 1 == _charsUsed) 1924_tokenStartPos = _curPos; // For entities: EOL normalization of 0xD and 0xD 0xA 1927_readerAdapter.OnNewLine(_curPos); 1942Throw(_curPos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0')); 1954_tokenStartPos = _curPos; 1963if (_curPos + 1 == _charsUsed) 1968if (_chars[_curPos + 1] == '#') 1973_stringBuilder.Append(_chars, _curPos, endPos - _curPos); 1990_stringBuilder.Append(_chars, _curPos, endPos - _curPos); 1999_tokenStartPos = _curPos; 2010_tokenStartPos = _curPos; 2018_tokenStartPos = _curPos; 2028if (_curPos == _charsUsed) 2035char ch = _chars[_curPos]; 2038if (_curPos + 1 == _charsUsed) 2043if (XmlCharType.IsLowSurrogate(_chars[_curPos])) 2049ThrowInvalidChar(_chars, _charsUsed, _curPos); 2055Debug.Assert(_curPos - _tokenStartPos == 0); 2062Throw(_curPos, SR.Xml_UnclosedQuote); 2065_tokenStartPos = _curPos; 2071switch (_chars[_curPos]) 2076Throw(_curPos, SR.Xml_ExpectExternalOrClose); 2084Throw(_curPos, SR.Xml_ExpectExternalOrClose); 2090Throw(_curPos, SR.Xml_ExpectExternalOrPublicId); 2097if (_chars[_curPos] != '"' && _chars[_curPos] != '\'') 2099ThrowUnexpectedToken(_curPos, "\"", "'"); 2110if (_chars[_curPos] == '%') 2127switch (_chars[_curPos]) 2132Throw(_curPos, SR.Xml_ExpectExternalOrClose); 2140Throw(_curPos, SR.Xml_ExpectExternalOrClose); 2152Throw(_curPos, SR.Xml_ExpectExternalIdOrEntityValue); 2159if (_chars[_curPos] == 'N') 2161while (_charsUsed - _curPos < 5) 2169if (_chars.AsSpan(_curPos + 1).StartsWith("DATA")) 2184if (_chars[_curPos] != '"' && _chars[_curPos] != '\'') 2186ThrowUnexpectedToken(_curPos, "\"", "'"); 2197if (_chars[_curPos] != '"' && _chars[_curPos] != '\'') 2211if (_chars[_curPos] != 'I') 2213Throw(_curPos, SR.Xml_ExpectIgnoreOrInclude); 2219if (_charsUsed - _curPos < 5) 2223switch (_chars[_curPos]) 2226if (_charsUsed - _curPos < 6) 2230if (_chars[_curPos + 1] != 'C' || _chars[_curPos + 2] != 'L' || 2231_chars[_curPos + 3] != 'U' || _chars[_curPos + 4] != 'D' || 2232_chars[_curPos + 5] != 'E' || XmlCharType.IsNameSingleChar(_chars[_curPos + 6])) 2241if (_chars[_curPos + 1] != 'N' || _chars[_curPos + 2] != 'O' || 2242_chars[_curPos + 3] != 'R' || _chars[_curPos + 4] != 'E' || 2243XmlCharType.IsNameSingleChar(_chars[_curPos + 5])) 2252Throw(_curPos - 1, SR.Xml_ExpectIgnoreOrInclude); 2258Throw(_curPos, SR.Xml_IncompleteDtdContent); 2270while (XmlCharType.IsTextChar(_chars[_curPos]) && _chars[_curPos] != ']') 2275switch (_chars[_curPos]) 2286_readerAdapter.OnNewLine(_curPos); 2289if (_chars[_curPos + 1] == (char)0xA) 2293else if (_curPos + 1 < _charsUsed || _readerAdapter.IsEof) 2301_readerAdapter.OnNewLine(_curPos); 2304if (_charsUsed - _curPos < 3) 2308if (_chars[_curPos + 1] != '!' || _chars[_curPos + 2] != '[') 2317if (_charsUsed - _curPos < 3) 2321if (_chars[_curPos + 1] != ']' || _chars[_curPos + 2] != '>') 2340if (_curPos == _charsUsed) 2347char ch = _chars[_curPos]; 2350if (_curPos + 1 == _charsUsed) 2355if (XmlCharType.IsLowSurrogate(_chars[_curPos])) 2361ThrowInvalidChar(_chars, _charsUsed, _curPos); 2374Throw(_curPos, SR.Xml_UnclosedConditionalSection); 2376_tokenStartPos = _curPos; 2392_tokenStartPos = _curPos; 2397if (XmlCharType.IsStartNCNameSingleChar(_chars[_curPos]) || _chars[_curPos] == ':') 2403if (_curPos + 1 >= _charsUsed) 2409Throw(_curPos, SR.Xml_UnexpectedEOF, "Name"); 2413Throw(_curPos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos)); 2420if (XmlCharType.IsNCNameSingleChar(_chars[_curPos])) 2430if (_chars[_curPos] == ':') 2436Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0')); 2438colonOffset = _curPos - _tokenStartPos; 2449else if (_curPos == _charsUsed) 2455if (_tokenStartPos == _curPos) 2457Throw(_curPos, SR.Xml_UnexpectedEOF, "Name"); 2468int offset = _curPos - _tokenStartPos; 2471_tokenStartPos = _curPos; 2478_tokenStartPos = _curPos; 2484if (XmlCharType.IsNCNameSingleChar(_chars[_curPos]) || _chars[_curPos] == ':') 2494if (_curPos < _charsUsed) 2496if (_curPos - _tokenStartPos == 0) 2498Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos)); 2503int len = _curPos - _tokenStartPos; 2509_tokenStartPos = _curPos; 2513Throw(_curPos, SR.Xml_UnexpectedEOF, "NmToken"); 2515_tokenStartPos = _curPos; 2522Debug.Assert(_chars[_curPos] == 'P'); 2523while (_charsUsed - _curPos < 6) 2531if (!_chars.AsSpan(_curPos + 1).StartsWith("UBLIC")) 2541Debug.Assert(_chars[_curPos] == 'S'); 2542while (_charsUsed - _curPos < 6) 2550if (!_chars.AsSpan(_curPos + 1).StartsWith("YSTEM")) 2574Debug.Assert(_chars[_curPos] == '&' || _chars[_curPos] == '%'); 2582Debug.Assert(_chars[_curPos - 1] == ';'); 2587Throw(_curPos - entityName.Name.Length - 1, SR.Xml_InvalidParEntityRef); 2597Throw(_curPos - entityName.Name.Length - 1, paramEntity ? SR.Xml_RecursiveParEntity : SR.Xml_RecursiveGenEntity, entityName.Name);