2 instantiations of Stats
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
59_accumulatedStats = new Stats(); 60_stats = new ThreadLocal<Stats>(() => new Stats(this));
12 references to Stats
Microsoft.Extensions.Caching.Memory (12)
MemoryCache.cs (12)
27private readonly List<WeakReference<Stats>>? _allStats; 28private readonly Stats? _accumulatedStats; 29private readonly ThreadLocal<Stats>? _stats; 58_allStats = new List<WeakReference<Stats>>(); 60_stats = new ThreadLocal<Stats>(() => new Stats(this)); 368foreach (WeakReference<Stats> wr in _allStats) 370if (wr.TryGetTarget(out Stats? stats)) 381private Stats GetStats() => _stats!.Value!; 400private void RemoveFromStats(Stats current) 406if (!_allStats[i].TryGetTarget(out Stats? stats)) 419private void AddToStats(Stats current) 423_allStats.Add(new WeakReference<Stats>(current));