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

◆ Atomize()

XPathNodeInfoAtom MS.Internal.Xml.Cache.XPathNodeInfoTable.Atomize ( XPathNodeInfoAtom info)
inlineprivate

Definition at line 36 of file XPathNodeInfoTable.cs.

37 {
38 for (XPathNodeInfoAtom xPathNodeInfoAtom = _hashTable[info.GetHashCode() & (_hashTable.Length - 1)]; xPathNodeInfoAtom != null; xPathNodeInfoAtom = xPathNodeInfoAtom.Next)
39 {
40 if (info.Equals(xPathNodeInfoAtom))
41 {
42 info.Next = _infoCached;
44 return xPathNodeInfoAtom;
45 }
46 }
47 if (_sizeTable >= _hashTable.Length)
48 {
49 XPathNodeInfoAtom[] hashTable = _hashTable;
50 _hashTable = new XPathNodeInfoAtom[hashTable.Length * 2];
51 for (int i = 0; i < hashTable.Length; i++)
52 {
53 XPathNodeInfoAtom xPathNodeInfoAtom = hashTable[i];
54 while (xPathNodeInfoAtom != null)
55 {
56 XPathNodeInfoAtom next = xPathNodeInfoAtom.Next;
57 AddInfo(xPathNodeInfoAtom);
58 xPathNodeInfoAtom = next;
59 }
60 }
61 }
62 AddInfo(info);
63 return info;
64 }

References MS.Internal.Xml.Cache.XPathNodeInfoTable._hashTable, MS.Internal.Xml.Cache.XPathNodeInfoTable._infoCached, MS.Internal.Xml.Cache.XPathNodeInfoTable._sizeTable, MS.Internal.Xml.Cache.XPathNodeInfoTable.AddInfo(), and MS.Internal.Xml.Cache.XPathNodeInfoAtom.Next.

Referenced by MS.Internal.Xml.Cache.XPathNodeInfoTable.Create().