src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (36)
18public static PooledObject<StringBuilder> GetPooledObject(this ObjectPool<StringBuilder> pool)
19=> PooledObject<StringBuilder>.Create(pool);
21public static PooledObject<StringBuilder> GetPooledObject(this ObjectPool<StringBuilder> pool, out StringBuilder builder)
23var pooledObject = PooledObject<StringBuilder>.Create(pool);
28public static PooledObject<Stack<TItem>> GetPooledObject<TItem>(this ObjectPool<Stack<TItem>> pool)
29=> PooledObject<Stack<TItem>>.Create(pool);
31public static PooledObject<Queue<TItem>> GetPooledObject<TItem>(this ObjectPool<Queue<TItem>> pool)
32=> PooledObject<Queue<TItem>>.Create(pool);
34public static PooledObject<HashSet<TItem>> GetPooledObject<TItem>(this ObjectPool<HashSet<TItem>> pool)
35=> PooledObject<HashSet<TItem>>.Create(pool);
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull
38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool);
40public static PooledObject<List<TItem>> GetPooledObject<TItem>(this ObjectPool<List<TItem>> pool)
41=> PooledObject<List<TItem>>.Create(pool);
43public static PooledObject<SegmentedList<TItem>> GetPooledObject<TItem>(this ObjectPool<SegmentedList<TItem>> pool)
44=> PooledObject<SegmentedList<TItem>>.Create(pool);
46public static PooledObject<Stack<TItem>> GetPooledObject<TItem>(this ObjectPool<Stack<TItem>> pool, out Stack<TItem> stack)
48var pooledObject = PooledObject<Stack<TItem>>.Create(pool);
53public static PooledObject<List<TItem>> GetPooledObject<TItem>(this ObjectPool<List<TItem>> pool, out List<TItem> list)
55var pooledObject = PooledObject<List<TItem>>.Create(pool);
60public static PooledObject<SegmentedList<TItem>> GetPooledObject<TItem>(this ObjectPool<SegmentedList<TItem>> pool, out SegmentedList<TItem> list)
62var pooledObject = PooledObject<SegmentedList<TItem>>.Create(pool);
67public static PooledObject<HashSet<TItem>> GetPooledObject<TItem>(this ObjectPool<HashSet<TItem>> pool, out HashSet<TItem> set)
69var pooledObject = PooledObject<HashSet<TItem>>.Create(pool);
74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary)
77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool);
82public static PooledObject<ConcurrentSet<T>> GetPooledObject<T>(this ObjectPool<ConcurrentSet<T>> pool, out ConcurrentSet<T> set)
85var pooledObject = PooledObject<ConcurrentSet<T>>.Create(pool);
90public static PooledObject<T> GetPooledObject<T>(this ObjectPool<T> pool) where T : class