9 instantiations of PooledObject
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (9)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (1)
91
=>
new
(pool, p => p.Allocate(), (p, o) => p.Free(o));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (8)
43
return new
PooledObject
<StringBuilder>(
51
return new
PooledObject
<Stack<TItem>>(
59
return new
PooledObject
<Queue<TItem>>(
67
return new
PooledObject
<HashSet<TItem>>(
75
return new
PooledObject
<ConcurrentSet<TItem>>(
84
return new
PooledObject
<Dictionary<TKey, TValue>>(
92
return new
PooledObject
<List<TItem>>(
100
return new
PooledObject
<SegmentedList<TItem>>(
44 references to PooledObject
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (44)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (36)
18
public static
PooledObject
<StringBuilder> GetPooledObject(this ObjectPool<StringBuilder> pool)
19
=>
PooledObject
<StringBuilder>.Create(pool);
21
public static
PooledObject
<StringBuilder> GetPooledObject(this ObjectPool<StringBuilder> pool, out StringBuilder builder)
23
var
pooledObject =
PooledObject
<StringBuilder>.Create(pool);
28
public static
PooledObject
<Stack<TItem>> GetPooledObject<TItem>(this ObjectPool<Stack<TItem>> pool)
29
=>
PooledObject
<Stack<TItem>>.Create(pool);
31
public static
PooledObject
<Queue<TItem>> GetPooledObject<TItem>(this ObjectPool<Queue<TItem>> pool)
32
=>
PooledObject
<Queue<TItem>>.Create(pool);
34
public static
PooledObject
<HashSet<TItem>> GetPooledObject<TItem>(this ObjectPool<HashSet<TItem>> pool)
35
=>
PooledObject
<HashSet<TItem>>.Create(pool);
37
public static
PooledObject
<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull
38
=>
PooledObject
<Dictionary<TKey, TValue>>.Create(pool);
40
public static
PooledObject
<List<TItem>> GetPooledObject<TItem>(this ObjectPool<List<TItem>> pool)
41
=>
PooledObject
<List<TItem>>.Create(pool);
43
public static
PooledObject
<SegmentedList<TItem>> GetPooledObject<TItem>(this ObjectPool<SegmentedList<TItem>> pool)
44
=>
PooledObject
<SegmentedList<TItem>>.Create(pool);
46
public static
PooledObject
<Stack<TItem>> GetPooledObject<TItem>(this ObjectPool<Stack<TItem>> pool, out Stack<TItem> stack)
48
var
pooledObject =
PooledObject
<Stack<TItem>>.Create(pool);
53
public static
PooledObject
<List<TItem>> GetPooledObject<TItem>(this ObjectPool<List<TItem>> pool, out List<TItem> list)
55
var
pooledObject =
PooledObject
<List<TItem>>.Create(pool);
60
public static
PooledObject
<SegmentedList<TItem>> GetPooledObject<TItem>(this ObjectPool<SegmentedList<TItem>> pool, out SegmentedList<TItem> list)
62
var
pooledObject =
PooledObject
<SegmentedList<TItem>>.Create(pool);
67
public static
PooledObject
<HashSet<TItem>> GetPooledObject<TItem>(this ObjectPool<HashSet<TItem>> pool, out HashSet<TItem> set)
69
var
pooledObject =
PooledObject
<HashSet<TItem>>.Create(pool);
74
public static
PooledObject
<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary)
77
var
pooledObject =
PooledObject
<Dictionary<TKey, TValue>>.Create(pool);
82
public static
PooledObject
<ConcurrentSet<T>> GetPooledObject<T>(this ObjectPool<ConcurrentSet<T>> pool, out ConcurrentSet<T> set)
85
var
pooledObject =
PooledObject
<ConcurrentSet<T>>.Create(pool);
90
public static
PooledObject
<T> GetPooledObject<T>(this ObjectPool<T> pool) where T : class
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (8)
41
public static
PooledObject
<StringBuilder> Create(ObjectPool<StringBuilder> pool)
49
public static
PooledObject
<Stack<TItem>> Create<TItem>(ObjectPool<Stack<TItem>> pool)
57
public static
PooledObject
<Queue<TItem>> Create<TItem>(ObjectPool<Queue<TItem>> pool)
65
public static
PooledObject
<HashSet<TItem>> Create<TItem>(ObjectPool<HashSet<TItem>> pool)
73
public static
PooledObject
<ConcurrentSet<TItem>> Create<TItem>(ObjectPool<ConcurrentSet<TItem>> pool) where TItem : notnull
81
public static
PooledObject
<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool)
90
public static
PooledObject
<List<TItem>> Create<TItem>(ObjectPool<List<TItem>> pool)
98
public static
PooledObject
<SegmentedList<TItem>> Create<TItem>(ObjectPool<SegmentedList<TItem>> pool)