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

◆ AddQName()

void System.Xml.XmlSqlBinaryReader.AddQName ( )
inlineprivate

Definition at line 1750 of file XmlSqlBinaryReader.cs.

1751 {
1752 int num = ReadNameRef();
1753 int num2 = ReadNameRef();
1754 int num3 = ReadNameRef();
1757 if (num4 == array.Length)
1758 {
1759 QName[] array2 = new QName[checked(num4 * 2)];
1760 Array.Copy(array, array2, num4);
1762 }
1763 string[] symtable = _symbolTables.symtable;
1764 string text = symtable[num2];
1765 string lname;
1766 string nsUri;
1767 if (num3 == 0)
1768 {
1769 if (num2 == 0 && num == 0)
1770 {
1771 return;
1772 }
1773 if (!text.StartsWith("xmlns", StringComparison.Ordinal))
1774 {
1775 goto IL_0104;
1776 }
1777 if (5 < text.Length)
1778 {
1779 if (6 == text.Length || ':' != text[5])
1780 {
1781 goto IL_0104;
1782 }
1783 lname = _xnt.Add(text.Substring(6));
1784 text = _xmlns;
1785 }
1786 else
1787 {
1788 lname = text;
1789 text = string.Empty;
1790 }
1791 nsUri = _nsxmlns;
1792 }
1793 else
1794 {
1795 lname = symtable[num3];
1796 nsUri = symtable[num];
1797 }
1798 array[num4].Set(text, lname, nsUri);
1799 return;
1800 IL_0104:
1801 throw new XmlException(System.SR.Xml_BadNamespaceDecl, (string[])null);
1802 }
static string Xml_BadNamespaceDecl
Definition SR.cs:134
Definition SR.cs:7
string Add(char[] array, int offset, int length)

References System.Xml.XmlSqlBinaryReader._nsxmlns, System.Xml.XmlSqlBinaryReader._symbolTables, System.Xml.XmlSqlBinaryReader._xmlns, System.Xml.XmlSqlBinaryReader._xnt, System.Xml.XmlNameTable.Add(), System.array, System.Array.Copy(), System.Xml.Dictionary, System.Xml.XmlSqlBinaryReader.SymbolTables.qnameCount, System.Xml.XmlSqlBinaryReader.SymbolTables.qnametable, System.Xml.XmlSqlBinaryReader.ReadNameRef(), System.Xml.XmlSqlBinaryReader.SymbolTables.symtable, System.text, System.SR.Xml_BadNamespaceDecl, and System.Xml.XmlException.

Referenced by System.Xml.XmlSqlBinaryReader.NextToken2().