1 write to _allStats
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
61_allStats = new List<WeakReference<Stats>>();
12 references to _allStats
Microsoft.Extensions.Caching.Memory (12)
MemoryCache.cs (12)
233if (_allStats is not null) 254if (_allStats is not null) 309if (_allStats is not null) 351lock (_allStats!) 356foreach (WeakReference<Stats> wr in _allStats) 390lock (_allStats!) 392for (int i = 0; i < _allStats.Count; i++) 394if (!_allStats[i].TryGetTarget(out Stats? stats)) 396_allStats.RemoveAt(i); 403_allStats.TrimExcess(); 409lock (_allStats!) 411_allStats.Add(new WeakReference<Stats>(current));