1 instantiation of PooledStringBuilder
Microsoft.CodeAnalysis.CodeStyle (1)
src\Dependencies\PooledObjects\PooledStringBuilder.cs (1)
84
pool = new ObjectPool<PooledStringBuilder>(() => new
PooledStringBuilder
(pool!), size);
19 references to PooledStringBuilder
Microsoft.CodeAnalysis.CodeStyle (19)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
43
using var _ =
PooledStringBuilder
.GetInstance(out var sb);
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)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher_TryParseSection.cs (1)
32
using var _0 =
PooledStringBuilder
.GetInstance(out var sb);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxNode.cs (2)
155
using var _ =
PooledStringBuilder
.GetInstance(out var sb);
167
using var _ =
PooledStringBuilder
.GetInstance(out var sb);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\Common\EmbeddedSyntaxToken.cs (2)
96
using var _ =
PooledStringBuilder
.GetInstance(out var sb);
103
using var _ =
PooledStringBuilder
.GetInstance(out var sb);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (1)
186
using var _ =
PooledStringBuilder
.GetInstance(out var builder);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledStringBuilder.cs (3)
11
public static PooledDisposer<
PooledStringBuilder
> GetInstance(out StringBuilder instance)
13
var
pooledInstance = GetInstance();
15
return new PooledDisposer<
PooledStringBuilder
>(pooledInstance);