MCPcopy Create free account
hub / github.com/apache/fory / TryGetValue

Method TryGetValue

csharp/src/Fory/FlatMap.cs:71–93  ·  view source on GitHub ↗
(ulong key, out TValue value)

Source from the content-addressed store, hash-verified

69 internal int Count => _count;
70
71 [MethodImpl(MethodImplOptions.AggressiveInlining)]
72 internal bool TryGetValue(ulong key, out TValue value)
73 {
74 int index = Place(key);
75 while (true)
76 {
77 ref Slot slot = ref _entries[index];
78 ulong slotKey = slot.Key;
79 if (slotKey == key)
80 {
81 value = slot.Value;
82 return true;
83 }
84
85 if (slotKey == EmptyKey)
86 {
87 value = default!;
88 return false;
89 }
90
91 index = (index + 1) & _mask;
92 }
93 }
94
95 [MethodImpl(MethodImplOptions.AggressiveInlining)]
96 internal void Set(ulong key, TValue value)

Callers 15

AssertMapMethod · 0.45
AssertArrayMapMethod · 0.45
WriteDataMethod · 0.45
ReadDataMethod · 0.45
AssignFieldIdsMethod · 0.45
TryWriteRefMethod · 0.45
StoreRemoteTypeMetaMethod · 0.45

Calls

no outgoing calls