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)
40if (_stringsByHashCode.TryGetValue(hashCode, out handle)) 65_stringsByHashCode.TryAdd(hashCode, handle); 69if (_stringsByHashCode.Count >= scavengeThreshold) 83_scavengeThreshold = _stringsByHashCode.Count * 2; 98foreach (KeyValuePair<int, StringWeakHandle> entry in _stringsByHashCode) 101if (!entry.Value.IsUsed && _stringsByHashCode.TryRemove(entry.Key, out StringWeakHandle? removedHandle)) 107if (!removedHandle.IsUsed || !_stringsByHashCode.TryAdd(entry.Key, removedHandle))
WeakStringCache.cs (3)
101foreach (KeyValuePair<int, StringWeakHandle> entry in _stringsByHashCode) 105_stringsByHashCode.Clear(); 126foreach (KeyValuePair<int, StringWeakHandle> entry in _stringsByHashCode)