1 instantiation of PooledHashSet
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledHashSet.cs (1)
70pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool, comparer), 128);
41 references to PooledHashSet
Microsoft.CodeAnalysis.Analyzers (41)
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (3)
192var builder = PooledHashSet<INamedTypeSymbol>.GetInstance(); 259private static void AddUsedNamedTypeCore(ITypeSymbol? type, PooledHashSet<INamedTypeSymbol> builder, ref bool hasAccessToTypeFromWorkspaceAssemblies)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (2)
180using var reportedInvalidLines = PooledHashSet<TextLine>.GetInstance();
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (2)
132using var seenInputSpansToFix = PooledHashSet<TextSpan>.GetInstance();
MetaAnalyzers\ReleaseTrackingHelper.cs (2)
54using var versionsBuilder = PooledHashSet<Version>.GetInstance();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (2)
204using var applicableAttributeNodes = PooledHashSet<SyntaxNode>.GetInstance();
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ImmutableHashSetExtensions.cs (4)
14using var builder = PooledHashSet<T>.GetInstance(); 54using var builder = PooledHashSet<T>.GetInstance();
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
503public static PooledHashSet<ISymbol> GetCaptures(this IOperation operation, IMethodSymbol lambdaOrLocalFunction) 510var builder = PooledHashSet<ISymbol>.GetInstance(); 511using var nestedLambdasAndLocalFunctions = PooledHashSet<IMethodSymbol>.GetInstance();
src\RoslynAnalyzers\Utilities\Compiler\Extensions\PooledHashSetExtensions.cs (1)
11public static void AddRange<T>(this PooledHashSet<T> builder, IEnumerable<T> set2)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (4)
501using var set = PooledHashSet<T>.GetInstance(); 519using var set = PooledHashSet<S>.GetInstance();
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledHashSet.cs (11)
19private readonly ObjectPool<PooledHashSet<T>>? _pool; 21private PooledHashSet(ObjectPool<PooledHashSet<T>>? pool, IEqualityComparer<T>? comparer) 63private static readonly ObjectPool<PooledHashSet<T>> s_poolInstance = CreatePool(); 64private static readonly ConcurrentDictionary<IEqualityComparer<T>, ObjectPool<PooledHashSet<T>>> s_poolInstancesByComparer = new(); 67public static ObjectPool<PooledHashSet<T>> CreatePool(IEqualityComparer<T>? comparer = null) 69ObjectPool<PooledHashSet<T>>? pool = null; 70pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool, comparer), 128); 74public static PooledHashSet<T> GetInstance(IEqualityComparer<T>? comparer = null) 79var instance = pool.Allocate(); 84public static PooledHashSet<T> GetInstance(IEnumerable<T> initializer, IEqualityComparer<T>? comparer = null) 86var instance = GetInstance(comparer);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\TemporarySet`1.cs (5)
26private PooledHashSet<T>? _storage; 36private PooledHashSet<T> GetOrCreateStorage(CancellationToken cancellationToken) 40var newStorage = PooledHashSet<T>.GetInstance(); 54var storage = GetOrCreateStorage(cancellationToken);