1 instantiation of PooledStringBuilder
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Dependencies\PooledObjects\PooledStringBuilder.cs (1)
84
pool = new ObjectPool<PooledStringBuilder>(() => new
PooledStringBuilder
(pool!), size);
15 references to PooledStringBuilder
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (15)
MSBuild\ProjectFile\Extensions.cs (2)
93
var
pooledBuilder =
PooledStringBuilder
.GetInstance();
src\Compilers\Core\Portable\CaseInsensitiveComparison.cs (2)
378
var
pooledStrbuilder =
PooledStringBuilder
.GetInstance();
src\Compilers\Core\Portable\InternalUtilities\JsonWriter.cs (2)
262
PooledStringBuilder
? pooledBuilder = null;
281
pooledBuilder =
PooledStringBuilder
.GetInstance();
src\Dependencies\PooledObjects\PooledStringBuilder.cs (9)
21
private readonly ObjectPool<
PooledStringBuilder
> _pool;
23
private PooledStringBuilder(ObjectPool<
PooledStringBuilder
> pool)
73
private static readonly ObjectPool<
PooledStringBuilder
> s_poolInstance = CreatePool();
81
public static ObjectPool<
PooledStringBuilder
> CreatePool(int size = 32)
83
ObjectPool<
PooledStringBuilder
>? pool = null;
84
pool = new ObjectPool<
PooledStringBuilder
>(() => new PooledStringBuilder(pool!), size);
88
public static
PooledStringBuilder
GetInstance()
90
var
builder = s_poolInstance.Allocate();
95
public static implicit operator StringBuilder(
PooledStringBuilder
obj)