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

◆ GetHashCode()

int IEqualityComparer. System.Xml.XPath.XPathNavigatorKeyComparer.GetHashCode ( object obj)
inlineprivate

Implements System.Collections.IEqualityComparer.

Definition at line 19 of file XPathNavigatorKeyComparer.cs.

20 {
21 if (obj == null)
22 {
23 throw new ArgumentNullException("obj");
24 }
26 {
27 return xPathDocumentNavigator.GetPositionHashCode();
28 }
29 if (obj is XPathNavigator xPathNavigator)
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 }

References System.Xml.Dictionary, and System.obj.