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

◆ Read()

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

Definition at line 897 of file XPathNavigatorReader.cs.

898 {
899 _attrCount = -1;
900 switch (_state)
901 {
902 case State.EOF:
903 case State.Closed:
904 case State.Error:
905 return false;
906 case State.Initial:
908 _state = State.Content;
909 if (_nav.NodeType == XPathNodeType.Root)
910 {
911 if (!_nav.MoveToFirstChild())
912 {
913 SetEOF();
914 return false;
915 }
916 _readEntireDocument = true;
917 }
918 else if (XPathNodeType.Attribute == _nav.NodeType)
919 {
920 _state = State.Attribute;
921 }
923 break;
924 case State.Content:
926 {
928 _depth++;
929 _state = State.Content;
930 break;
931 }
932 if (_nodeType == XmlNodeType.Element && !_nav.IsEmptyElement)
933 {
934 _nodeType = XmlNodeType.EndElement;
935 _state = State.EndElement;
936 break;
937 }
938 goto case State.EndElement;
939 case State.EndElement:
940 if (_depth == 0 && !_readEntireDocument)
941 {
942 SetEOF();
943 return false;
944 }
945 if (_nav.MoveToNext())
946 {
948 _state = State.Content;
949 break;
950 }
951 if (_depth > 0 && _nav.MoveToParent())
952 {
953 _nodeType = XmlNodeType.EndElement;
954 _state = State.EndElement;
955 _depth--;
956 break;
957 }
958 SetEOF();
959 return false;
960 case State.Attribute:
961 case State.AttrVal:
962 if (!_nav.MoveToParent())
963 {
964 SetEOF();
965 return false;
966 }
968 _depth--;
969 if (_state == State.AttrVal)
970 {
971 _depth--;
972 }
973 goto case State.Content;
974 case State.InReadBinary:
977 return Read();
978 }
979 return true;
980 }
ReadContentAsBinaryHelper _readBinaryHelper
static XmlNodeType ToXmlNodeType(XPathNodeType typ)

References System.Xml.XPath.XPathNavigatorReader._attrCount, System.Xml.XPath.XPathNavigatorReader._depth, System.Xml.XPath.XPathNavigatorReader._nav, System.Xml.XPath.XPathNavigatorReader._navToRead, System.Xml.XPath.XPathNavigatorReader._nodeType, System.Xml.XPath.XPathNavigatorReader._readBinaryHelper, System.Xml.XPath.XPathNavigatorReader._readEntireDocument, System.Xml.XPath.XPathNavigatorReader._savedState, System.Xml.XPath.XPathNavigatorReader._state, System.Xml.ReadContentAsBinaryHelper.Finish(), System.Xml.XPath.XPathNavigator.IsEmptyElement, System.Xml.XPath.XPathNavigator.MoveToFirstChild(), System.Xml.XPath.XPathNavigator.MoveToNext(), System.Xml.XPath.XPathNavigator.MoveToParent(), System.Xml.XPath.XPathNavigator.NodeType, System.Xml.XPath.XPathNavigatorReader.Read(), System.Xml.XPath.XPathNavigatorReader.SetEOF(), and System.Xml.XPath.XPathNavigatorReader.ToXmlNodeType().

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