Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ParseNamedCharRefInline()

int System.Xml.XmlTextReaderImpl.ParseNamedCharRefInline ( int startPos,
bool expand,
StringBuilder internalSubsetBuilder )
inlineprivate

Definition at line 6724 of file XmlTextReaderImpl.cs.

6725 {
6726 int num = startPos + 1;
6727 char[] chars = _ps.chars;
6728 char c = chars[num];
6729 char c2;
6730 if ((uint)c <= 103u)
6731 {
6732 if (c != 'a')
6733 {
6734 if (c != 'g')
6735 {
6736 goto IL_0170;
6737 }
6738 if (_ps.charsUsed - num >= 3)
6739 {
6740 if (chars[num + 1] == 't' && chars[num + 2] == ';')
6741 {
6742 num += 3;
6743 c2 = '>';
6744 goto IL_0175;
6745 }
6746 return -1;
6747 }
6748 }
6749 else
6750 {
6751 num++;
6752 if (chars[num] == 'm')
6753 {
6754 if (_ps.charsUsed - num >= 3)
6755 {
6756 if (chars[num + 1] == 'p' && chars[num + 2] == ';')
6757 {
6758 num += 3;
6759 c2 = '&';
6760 goto IL_0175;
6761 }
6762 return -1;
6763 }
6764 }
6765 else if (chars[num] == 'p')
6766 {
6767 if (_ps.charsUsed - num >= 4)
6768 {
6769 if (chars[num + 1] == 'o' && chars[num + 2] == 's' && chars[num + 3] == ';')
6770 {
6771 num += 4;
6772 c2 = '\'';
6773 goto IL_0175;
6774 }
6775 return -1;
6776 }
6777 }
6778 else if (num < _ps.charsUsed)
6779 {
6780 return -1;
6781 }
6782 }
6783 goto IL_0172;
6784 }
6785 if (c != 'l')
6786 {
6787 if (c != 'q')
6788 {
6789 goto IL_0170;
6790 }
6791 if (_ps.charsUsed - num < 5)
6792 {
6793 goto IL_0172;
6794 }
6795 if (chars[num + 1] != 'u' || chars[num + 2] != 'o' || chars[num + 3] != 't' || chars[num + 4] != ';')
6796 {
6797 return -1;
6798 }
6799 num += 5;
6800 c2 = '"';
6801 }
6802 else
6803 {
6804 if (_ps.charsUsed - num < 3)
6805 {
6806 goto IL_0172;
6807 }
6808 if (chars[num + 1] != 't' || chars[num + 2] != ';')
6809 {
6810 return -1;
6811 }
6812 num += 3;
6813 c2 = '<';
6814 }
6815 goto IL_0175;
6816 IL_0170:
6817 return -1;
6818 IL_0172:
6819 return -2;
6820 IL_0175:
6821 if (expand)
6822 {
6824 _ps.chars[num - 1] = c2;
6825 }
6826 return num;
6827 }

References System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl.ParsingState.charPos, System.chars, System.Xml.XmlTextReaderImpl.ParsingState.chars, System.Xml.XmlTextReaderImpl.ParsingState.charsUsed, and System.Xml.Dictionary.

Referenced by System.Xml.XmlTextReaderImpl.ParseCharRefInline(), System.Xml.XmlTextReaderImpl.ParseNamedCharRef(), and System.Xml.XmlTextReaderImpl.ParseNamedCharRefAsync().