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

◆ FindEntry()

bool System.Xml.Linq.XHashtable< TValue >.XHashtableState.FindEntry ( int hashCode,
string key,
int index,
int count,
ref int entryIndex )
inlineprivate

Definition at line 125 of file XHashtable.cs.

126 {
127 int num = entryIndex;
128 int num2 = ((num != 0) ? num : _buckets[hashCode & (_buckets.Length - 1)]);
129 while (num2 > 0)
130 {
131 if (_entries[num2].HashCode == hashCode)
132 {
134 if (text == null)
135 {
136 if (_entries[num2].Next > 0)
137 {
138 _entries[num2].Value = default(TValue);
140 if (num == 0)
141 {
142 _buckets[hashCode & (_buckets.Length - 1)] = num2;
143 }
144 else
145 {
146 _entries[num].Next = num2;
147 }
148 continue;
149 }
150 }
151 else if (count == text.Length && string.CompareOrdinal(key, index, text, 0, count) == 0)
152 {
154 return true;
155 }
156 }
157 num = num2;
159 }
160 entryIndex = num;
161 return false;
162 }
readonly ExtractKeyDelegate _extractKey
Definition XHashtable.cs:27

References System.Xml.Linq.XHashtable< TValue >.XHashtableState._buckets, System.Xml.Linq.XHashtable< TValue >.XHashtableState._entries, System.Xml.Linq.XHashtable< TValue >.XHashtableState._extractKey, System.count, System.Xml.Dictionary, System.index, System.key, System.Xml.Linq.XHashtable< TValue >.XHashtableState.Entry.Next, System.text, System.Xml.Linq.XHashtable< TValue >.XHashtableState.Entry.Value, and System.Xml.Linq.Value.

Referenced by System.Xml.Linq.XHashtable< TValue >.XHashtableState.TryAdd(), and System.Xml.Linq.XHashtable< TValue >.XHashtableState.TryGetValue().