1 instantiation of PooledSortedSet
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
52() => new PooledSortedSet<T>(pool, comparer),
15 references to PooledSortedSet
Roslyn.Diagnostics.Analyzers (15)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (15)
21private readonly ObjectPool<PooledSortedSet<T>>? _pool; 23public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 45private static readonly ObjectPool<PooledSortedSet<T>> s_poolInstance = CreatePool(); 46private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 48private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 50ObjectPool<PooledSortedSet<T>>? pool = null; 51pool = new ObjectPool<PooledSortedSet<T>>( 58/// Gets a pooled instance of a <see cref="PooledSortedSet{T}"/> with an optional comparer. 61/// <returns>An empty <see cref="PooledSortedSet{T}"/>.</returns> 62public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 67var instance = pool.Allocate(); 73/// Gets a pooled instance of a <see cref="PooledSortedSet{T}"/> with the given initializer and an optional comparer. 77/// <returns>An empty <see cref="PooledSortedSet{T}"/>.</returns> 78public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null) 80var instance = GetInstance(comparer);