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

◆ MoveToAttribute() [3/4]

override bool System.Xml.XPath.XPathNavigatorReader.MoveToAttribute ( string name)
inline

Definition at line 705 of file XPathNavigatorReader.cs.

706 {
707 int depth;
708 XPathNavigator elemNav = GetElemNav(out depth);
709 if (elemNav == null)
710 {
711 return false;
712 }
713 ValidateNames.SplitQName(name, out var prefix, out var lname);
714 bool flag = false;
715 if ((flag = prefix.Length == 0 && lname == "xmlns") || prefix == "xmlns")
716 {
717 if (flag)
718 {
719 lname = string.Empty;
720 }
721 if (!elemNav.MoveToFirstNamespace(XPathNamespaceScope.Local))
722 {
723 goto IL_00b3;
724 }
725 while (!(elemNav.LocalName == lname))
726 {
727 if (elemNav.MoveToNextNamespace(XPathNamespaceScope.Local))
728 {
729 continue;
730 }
731 goto IL_00b3;
732 }
733 }
734 else if (prefix.Length == 0)
735 {
736 if (!elemNav.MoveToAttribute(lname, string.Empty))
737 {
738 goto IL_00b3;
739 }
740 }
741 else
742 {
743 if (!elemNav.MoveToFirstAttribute())
744 {
745 goto IL_00b3;
746 }
747 while (!(elemNav.LocalName == lname) || !(elemNav.Prefix == prefix))
748 {
749 if (elemNav.MoveToNextAttribute())
750 {
751 continue;
752 }
753 goto IL_00b3;
754 }
755 }
756 if (_state == State.InReadBinary)
757 {
760 }
761 MoveToAttr(elemNav, depth + 1);
762 return true;
763 IL_00b3:
764 return false;
765 }
void MoveToAttr(XPathNavigator nav, int depth)
ReadContentAsBinaryHelper _readBinaryHelper

References System.Xml.XPath.XPathNavigatorReader._readBinaryHelper, System.Xml.XPath.XPathNavigatorReader._savedState, System.Xml.XPath.XPathNavigatorReader._state, System.Xml.Dictionary, System.Xml.ReadContentAsBinaryHelper.Finish(), System.Xml.XPath.XPathNavigatorReader.GetElemNav(), System.Xml.XPath.XPathNavigatorReader.MoveToAttr(), System.prefix, and System.Xml.ValidateNames.SplitQName().