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

◆ TryGetEntry()

bool System.Runtime.CompilerServices.ConditionalWeakTable< TKey, TValue >.Container.TryGetEntry ( int index,
[NotNullWhen(true)] out TKey key,
[MaybeNullWhen(false)] out TValue value )
inlinepackage

Definition at line 181 of file ConditionalWeakTable.cs.

182 {
183 if (index < _entries.Length)
184 {
185 object dependent;
187 GC.KeepAlive(this);
188 if (obj != null)
189 {
190 key = Unsafe.As<TKey>(obj);
191 value = Unsafe.As<TValue>(dependent);
192 return true;
193 }
194 }
195 key = null;
196 value = null;
197 return false;
198 }
object UnsafeGetTargetAndDependent(out object dependent)

References System.Runtime.CompilerServices.ConditionalWeakTable< TKey, TValue >.Container._entries, System.Runtime.CompilerServices.ConditionalWeakTable< TKey, TValue >.Entry.depHnd, System.index, System.GC.KeepAlive(), System.key, System.obj, System.Runtime.DependentHandle.UnsafeGetTargetAndDependent(), and System.value.

Referenced by System.Runtime.CompilerServices.ConditionalWeakTable< TKey, TValue >.Enumerator.MoveNext().