14 references to s_switches
System.Diagnostics.TraceSource (14)
System\Diagnostics\Switch.cs (14)
63
lock (
s_switches
)
66
s_switches
.Add(new WeakReference<Switch>(this));
74
lock (
s_switches
)
78
List<WeakReference<Switch>> buffer = new List<WeakReference<Switch>>(
s_switches
.Count);
79
for (int i = 0; i <
s_switches
.Count; i++)
81
if (
s_switches
[i].TryGetTarget(out _))
83
buffer.Add(
s_switches
[i]);
86
if (buffer.Count <
s_switches
.Count)
88
s_switches
.Clear();
89
s_switches
.AddRange(buffer);
90
s_switches
.TrimExcess();
275
lock (
s_switches
)
278
for (int i = 0; i <
s_switches
.Count; i++)
280
if (
s_switches
[i].TryGetTarget(out Switch? swtch))