1 write to _stringsByHashCode
Microsoft.NET.StringTools (1)
WeakStringCache.Concurrent.cs (1)
20
_stringsByHashCode
= new ConcurrentDictionary<int, StringWeakHandle>(Environment.ProcessorCount, _initialCapacity);
10 references to _stringsByHashCode
Microsoft.NET.StringTools (10)
WeakStringCache.Concurrent.cs (7)
40
if (
_stringsByHashCode
.TryGetValue(hashCode, out handle))
65
_stringsByHashCode
.TryAdd(hashCode, handle);
69
if (
_stringsByHashCode
.Count >= scavengeThreshold)
83
_scavengeThreshold =
_stringsByHashCode
.Count * 2;
98
foreach (KeyValuePair<int, StringWeakHandle> entry in
_stringsByHashCode
)
101
if (!entry.Value.IsUsed &&
_stringsByHashCode
.TryRemove(entry.Key, out StringWeakHandle? removedHandle))
107
if (!removedHandle.IsUsed || !
_stringsByHashCode
.TryAdd(entry.Key, removedHandle))
WeakStringCache.cs (3)
101
foreach (KeyValuePair<int, StringWeakHandle> entry in
_stringsByHashCode
)
105
_stringsByHashCode
.Clear();
126
foreach (KeyValuePair<int, StringWeakHandle> entry in
_stringsByHashCode
)