1 instantiation of Box
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
102
var box = new
Box
(key, value);
8 references to Box
Microsoft.CodeAnalysis.CodeStyle (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (8)
55
private readonly ConditionalWeakTable<TKey,
Box
> _table = new();
56
private ImmutableList<WeakReference<
Box
>> _items = [];
62
if (_table.TryGetValue(key, out
var
box))
102
var
box = new Box(key, value);
104
_items = _items.Add(new WeakReference<
Box
>(box));
109
if (!_table.TryGetValue(key, out
var
box))
115
_items = _items.RemoveAll(item => !item.TryGetTarget(out
var
target) || ReferenceEquals(target, box));
123
if (item.TryGetTarget(out
var
box))