Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XPathNavigatorKeyComparer.cs
Go to the documentation of this file.
3
4namespace System.Xml.XPath;
5
7{
8 bool IEqualityComparer.Equals(object obj1, object obj2)
9 {
12 if (xPathNavigator != null && xPathNavigator2 != null && xPathNavigator.IsSamePosition(xPathNavigator2))
13 {
14 return true;
15 }
16 return false;
17 }
18
20 {
21 if (obj == null)
22 {
23 throw new ArgumentNullException("obj");
24 }
26 {
27 return xPathDocumentNavigator.GetPositionHashCode();
28 }
30 {
31 object underlyingObject = xPathNavigator.UnderlyingObject;
32 if (underlyingObject != null)
33 {
34 return underlyingObject.GetHashCode();
35 }
36 int nodeType = (int)xPathNavigator.NodeType;
37 nodeType ^= xPathNavigator.LocalName.GetHashCode();
38 nodeType ^= xPathNavigator.Prefix.GetHashCode();
39 return nodeType ^ xPathNavigator.NamespaceURI.GetHashCode();
40 }
41 return obj.GetHashCode();
42 }
43}
new bool Equals(object? x, object? y)