1 instantiation of PooledDictionary
Test.Utilities (1)
PooledDictionary.cs (1)
87pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool, keyComparer), 128);
33 references to PooledDictionary
Test.Utilities (33)
AggregateCategorizedAnalyzerConfigOptions.cs (2)
67var perTreeOptionsBuilder = PooledDictionary<SyntaxTree, Lazy<SyntaxTreeCategorizedAnalyzerConfigOptions>>.GetInstance();
PooledDictionary.cs (11)
19private readonly ObjectPool<PooledDictionary<K, V>>? _pool; 21private PooledDictionary(ObjectPool<PooledDictionary<K, V>>? pool, IEqualityComparer<K>? keyComparer) 79private static readonly ObjectPool<PooledDictionary<K, V>> s_poolInstance = CreatePool(); 80private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledDictionary<K, V>>> s_poolInstancesByComparer 84public static ObjectPool<PooledDictionary<K, V>> CreatePool(IEqualityComparer<K>? keyComparer = null) 86ObjectPool<PooledDictionary<K, V>>? pool = null; 87pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool, keyComparer), 128); 91public static PooledDictionary<K, V> GetInstance(IEqualityComparer<K>? keyComparer = null) 96var instance = pool.Allocate(); 101public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 103var instance = GetInstance(keyComparer);
SymbolNamesWithValueOption.cs (15)
87var namesBuilder = PooledDictionary<string, TValue>.GetInstance(); 88var symbolsBuilder = PooledDictionary<ISymbol, TValue>.GetInstance(); 89var wildcardNamesBuilder = PooledDictionary<SymbolKind, PooledDictionary<string, TValue>>.GetInstance(); 139static void ProcessWildcardName(NameParts parts, PooledDictionary<SymbolKind, PooledDictionary<string, TValue>> wildcardNamesBuilder) 146if (!wildcardNamesBuilder.TryGetValue(AllKinds, out var associatedValues)) 148associatedValues = PooledDictionary<string, TValue>.GetInstance(); 169if (!wildcardNamesBuilder.TryGetValue(symbolKind.Value, out var associatedValues)) 171associatedValues = PooledDictionary<string, TValue>.GetInstance(); 179static void ProcessName(NameParts parts, PooledDictionary<string, TValue> namesBuilder) 187static void ProcessSymbolName(NameParts parts, Compilation compilation, string? optionalPrefix, PooledDictionary<ISymbol, TValue> symbolsBuilder)
TemporaryDictionary`2.cs (5)
25private PooledDictionary<TKey, TValue>? _storage; 35private PooledDictionary<TKey, TValue> GetOrCreateStorage(CancellationToken cancellationToken) 39var newStorage = PooledDictionary<TKey, TValue>.GetInstance(); 53var storage = GetOrCreateStorage(cancellationToken);