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)
30
private readonly List<WeakReference<
Stats
>>? _allStats;
33
private readonly ThreadLocal<
Stats
>? _stats;
62
_allStats = new List<WeakReference<
Stats
>>();
63
_stats = new ThreadLocal<
Stats
>(() => new Stats(this));
409
foreach (WeakReference<
Stats
> wr in _allStats)
411
if (wr.TryGetTarget(out
Stats
? stats))
422
private
Stats
GetStats() => _stats!.Value!;
439
private void RemoveFromStats(
Stats
current)
446
List<WeakReference<
Stats
>> all = _allStats;
456
private void AddToStats(
Stats
current)
460
_allStats.Add(new WeakReference<
Stats
>(current));