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

◆ GetAttributeNode() [3/4]

XmlAttributeNode System.Xml.XmlBaseReader.GetAttributeNode ( string name)
inlineprivateinherited

Definition at line 1653 of file XmlBaseReader.cs.

1654 {
1655 if (name == null)
1656 {
1657 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("name"));
1658 }
1660 {
1661 return null;
1662 }
1663 int num = name.IndexOf(':');
1664 string prefix;
1665 string localName;
1666 if (num == -1)
1667 {
1668 if (name == "xmlns")
1669 {
1670 prefix = "xmlns";
1671 localName = string.Empty;
1672 }
1673 else
1674 {
1675 prefix = string.Empty;
1676 localName = name;
1677 }
1678 }
1679 else
1680 {
1681 prefix = name.Substring(0, num);
1682 localName = name.Substring(num + 1);
1683 }
1684 XmlAttributeNode[] attributeNodes = _attributeNodes;
1685 int attributeCount = _attributeCount;
1686 int num2 = _attributeStart;
1687 for (int i = 0; i < attributeCount; i++)
1688 {
1689 if (++num2 >= attributeCount)
1690 {
1691 num2 = 0;
1692 }
1693 XmlAttributeNode xmlAttributeNode = attributeNodes[num2];
1694 if (xmlAttributeNode.IsPrefixAndLocalName(prefix, localName))
1695 {
1697 return xmlAttributeNode;
1698 }
1699 }
1700 return null;
1701 }
XmlAttributeNode[] _attributeNodes

References System.Xml.XmlBaseReader.NamespaceManager._attributeCount, System.Xml.XmlBaseReader._attributeNodes, System.Xml.XmlBaseReader._attributeStart, System.Xml.XmlBaseReader._node, System.Xml.XmlBaseReader.XmlNode.CanGetAttribute, System.Xml.Dictionary, System.prefix, and System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError().