1 instantiation of Stats
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
63_stats = new ThreadLocal<Stats>(() => new Stats(this));
11 references to Stats
Microsoft.Extensions.Caching.Memory (11)
MemoryCache.cs (11)
30private readonly List<WeakReference<Stats>>? _allStats; 33private readonly ThreadLocal<Stats>? _stats; 62_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!; 439private void RemoveFromStats(Stats current) 446List<WeakReference<Stats>> all = _allStats; 456private void AddToStats(Stats current) 460_allStats.Add(new WeakReference<Stats>(current));