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

◆ MoveToNextAttribute()

override bool System.Xml.XPath.XPathNavigatorReader.MoveToNextAttribute ( )
inline

Definition at line 633 of file XPathNavigatorReader.cs.

634 {
635 switch (_state)
636 {
637 case State.Content:
638 return MoveToFirstAttribute();
639 case State.Attribute:
640 {
641 if (XPathNodeType.Attribute == _nav.NodeType)
642 {
643 return _nav.MoveToNextAttribute();
644 }
645 XPathNavigator xPathNavigator = _nav.Clone();
646 if (!xPathNavigator.MoveToParent())
647 {
648 return false;
649 }
650 if (!xPathNavigator.MoveToFirstNamespace(XPathNamespaceScope.Local))
651 {
652 return false;
653 }
654 if (xPathNavigator.IsSamePosition(_nav))
655 {
656 xPathNavigator.MoveToParent();
657 if (!xPathNavigator.MoveToFirstAttribute())
658 {
659 return false;
660 }
662 return true;
663 }
664 XPathNavigator xPathNavigator2 = xPathNavigator.Clone();
665 while (true)
666 {
667 if (!xPathNavigator.MoveToNextNamespace(XPathNamespaceScope.Local))
668 {
669 return false;
670 }
671 if (xPathNavigator.IsSamePosition(_nav))
672 {
673 break;
674 }
676 }
678 return true;
679 }
680 case State.AttrVal:
681 _depth--;
682 _state = State.Attribute;
683 if (!MoveToNextAttribute())
684 {
685 _depth++;
686 _state = State.AttrVal;
687 return false;
688 }
689 _nodeType = XmlNodeType.Attribute;
690 return true;
691 case State.InReadBinary:
693 if (!MoveToNextAttribute())
694 {
695 _state = State.InReadBinary;
696 return false;
697 }
699 return true;
700 default:
701 return false;
702 }
703 }
ReadContentAsBinaryHelper _readBinaryHelper
bool MoveTo(XPathNavigator other)

References System.Xml.XPath.XPathNavigatorReader._depth, System.Xml.XPath.XPathNavigatorReader._nav, System.Xml.XPath.XPathNavigatorReader._nodeType, System.Xml.XPath.XPathNavigatorReader._readBinaryHelper, System.Xml.XPath.XPathNavigatorReader._savedState, System.Xml.XPath.XPathNavigatorReader._state, System.Xml.XPath.XPathNavigator.Clone(), System.Xml.ReadContentAsBinaryHelper.Finish(), System.Xml.XPath.XPathNavigator.MoveTo(), System.Xml.XPath.XPathNavigatorReader.MoveToFirstAttribute(), System.Xml.XPath.XPathNavigator.MoveToNextAttribute(), System.Xml.XPath.XPathNavigatorReader.MoveToNextAttribute(), and System.Xml.XPath.XPathNavigator.NodeType.

Referenced by System.Xml.XPath.XPathNavigatorReader.MoveToNextAttribute().