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

◆ ComparePosition() [1/2]

override XmlNodeOrder System.Xml.DocumentXPathNavigator.ComparePosition ( XPathNavigator other)
inline

Definition at line 1216 of file DocumentXPathNavigator.cs.

1217 {
1219 {
1220 return XmlNodeOrder.Unknown;
1221 }
1222 CalibrateText();
1223 documentXPathNavigator.CalibrateText();
1224 if (_source == documentXPathNavigator._source && _namespaceParent == documentXPathNavigator._namespaceParent)
1225 {
1226 return XmlNodeOrder.Same;
1227 }
1228 if (_namespaceParent != null || documentXPathNavigator._namespaceParent != null)
1229 {
1230 return base.ComparePosition(other);
1231 }
1232 XmlNode xmlNode = _source;
1233 XmlNode xmlNode2 = documentXPathNavigator._source;
1234 XmlNode xmlNode3 = OwnerNode(xmlNode);
1235 XmlNode xmlNode4 = OwnerNode(xmlNode2);
1236 if (xmlNode3 == xmlNode4)
1237 {
1238 if (xmlNode3 == null)
1239 {
1240 return XmlNodeOrder.Unknown;
1241 }
1242 return Compare(xmlNode, xmlNode2);
1243 }
1244 int num = GetDepth(xmlNode);
1245 int num2 = GetDepth(xmlNode2);
1246 if (num2 > num)
1247 {
1248 while (xmlNode2 != null && num2 > num)
1249 {
1251 num2--;
1252 }
1253 if (xmlNode == xmlNode2)
1254 {
1255 return XmlNodeOrder.Before;
1256 }
1258 }
1259 else if (num > num2)
1260 {
1261 while (xmlNode != null && num > num2)
1262 {
1264 num--;
1265 }
1266 if (xmlNode == xmlNode2)
1267 {
1268 return XmlNodeOrder.After;
1269 }
1271 }
1272 while (xmlNode3 != null && xmlNode4 != null)
1273 {
1274 if (xmlNode3 == xmlNode4)
1275 {
1276 return Compare(xmlNode, xmlNode2);
1277 }
1278 xmlNode = xmlNode3;
1282 }
1283 return XmlNodeOrder.Unknown;
1284 }
static XmlNode OwnerNode(XmlNode node)
XmlNodeOrder Compare(XmlNode node1, XmlNode node2)
DocumentXPathNavigator(XmlDocument document, XmlNode node)

References System.Xml.DocumentXPathNavigator._namespaceParent, System.Xml.DocumentXPathNavigator._source, System.Xml.DocumentXPathNavigator.CalibrateText(), System.Xml.DocumentXPathNavigator.Compare(), System.Xml.Dictionary, System.Xml.DocumentXPathNavigator.GetDepth(), System.other, and System.Xml.DocumentXPathNavigator.OwnerNode().