2 instantiations of Stats
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
62_accumulatedStats = new Stats(); 63_stats = new ThreadLocal<Stats>(() => new Stats(this));
12 references to Stats
Microsoft.Extensions.Caching.Memory (12)
MemoryCache.cs (12)
30private readonly List<WeakReference<Stats>>? _allStats; 31private readonly Stats? _accumulatedStats; 32private readonly ThreadLocal<Stats>? _stats; 61_allStats = new List<WeakReference<Stats>>(); 63_stats = new ThreadLocal<Stats>(() => new Stats(this)); 409foreach (WeakReference<Stats> wr in _allStats) 411if (wr.TryGetTarget(out Stats? stats)) 422private Stats GetStats() => _stats!.Value!; 441private void RemoveFromStats(Stats current) 447if (!_allStats[i].TryGetTarget(out Stats? stats)) 460private void AddToStats(Stats current) 464_allStats.Add(new WeakReference<Stats>(current));