2 instantiations of ArrayBuilderPool
Microsoft.AspNetCore.Razor.Utilities.Shared (2)
PooledObjects\ArrayBuilderPool`1.cs (2)
29
=>
new
(Policy.Create(initialCapacity, maximumObjectSize), poolSize);
32
=>
new
(policy, poolSize);
48 references to ArrayBuilderPool
Microsoft.AspNetCore.Razor.Utilities.Shared (6)
PooledObjects\ArrayBuilderPool`1.cs (3)
18
public static readonly
ArrayBuilderPool
<T> Default = Create();
25
public static
ArrayBuilderPool
<T> Create(
31
public static
ArrayBuilderPool
<T> Create(PooledObjectPolicy policy, Optional<int> poolSize = default)
PooledObjects\PooledArrayBuilder`1.cs (3)
36
private
ArrayBuilderPool
<T>? _builderPool;
61
public PooledArrayBuilder(int? capacity = null,
ArrayBuilderPool
<T>? builderPool = null)
1601
_builderPool ??=
ArrayBuilderPool
<T>.Default;
Microsoft.AspNetCore.Razor.Utilities.Shared.UnitTests (20)
PooledObjects\PooledArrayBuilderOrderingTests.cs (8)
105
var
builderPool = TestArrayBuilderPool<int>.Create();
118
var
builderPool = TestArrayBuilderPool<int>.Create();
131
var
builderPool = TestArrayBuilderPool<int>.Create();
144
var
builderPool = TestArrayBuilderPool<int>.Create();
157
var
builderPool = TestArrayBuilderPool<ValueHolder<int>>.Create();
170
var
builderPool = TestArrayBuilderPool<ValueHolder<int>>.Create();
183
var
builderPool = TestArrayBuilderPool<ValueHolder<int>>.Create();
196
var
builderPool = TestArrayBuilderPool<ValueHolder<int>>.Create();
PooledObjects\PooledArrayBuilderTests.cs (8)
96
var
builderPool = TestArrayBuilderPool<int>.Create();
422
var
builderPool = TestArrayBuilderPool<int>.Create();
456
var
builderPool = TestArrayBuilderPool<int>.Create();
737
var
builderPool = TestArrayBuilderPool<int>.Create();
984
var
builderPool = TestArrayBuilderPool<int>.Create();
1162
var
builderPool = TestArrayBuilderPool<int>.Create();
1398
var
builderPool = TestArrayBuilderPool<int>.Create();
1813
var
builderPool = TestArrayBuilderPool<int>.Create();
PooledObjects\TestArrayBuilderPool`1.cs (4)
11
public static
ArrayBuilderPool
<T> Create(
12
ArrayBuilderPool
<T>.PooledObjectPolicy? policy = null, int size = 1)
13
=>
ArrayBuilderPool
<T>.Create(policy ?? NoReturnPolicy.Instance, size);
15
public sealed class NoReturnPolicy :
ArrayBuilderPool
<T>.PooledObjectPolicy
Microsoft.CodeAnalysis.Razor.Compiler (13)
CSharp\GenericTypeNameRewriter.cs (1)
36
using var _ =
ArrayBuilderPool
<ComponentTypeArgumentIntermediateNode>.GetPooledObject(out var builder);
Language\CodeGeneration\CodeRenderingContext.cs (6)
53
_diagnostics =
ArrayBuilderPool
<RazorDiagnostic>.Default.Get();
60
_linePragmas =
ArrayBuilderPool
<LinePragma>.Default.Get();
61
_sourceMappings =
ArrayBuilderPool
<SourceMapping>.Default.Get();
71
ArrayBuilderPool
<RazorDiagnostic>.Default.Return(_diagnostics);
72
ArrayBuilderPool
<LinePragma>.Default.Return(_linePragmas);
73
ArrayBuilderPool
<SourceMapping>.Default.Return(_sourceMappings);
Language\Legacy\ErrorSink.cs (3)
23
ArrayBuilderPool
<RazorDiagnostic>.Default.Return(errors);
37
ArrayBuilderPool
<RazorDiagnostic>.Default.Return(errors);
49
var errors = _errors ??=
ArrayBuilderPool
<RazorDiagnostic>.Default.Get();
Language\Legacy\TagHelperSpanVisitor.cs (1)
23
using var _ =
ArrayBuilderPool
<TagHelperSpanInternal>.GetPooledObject(out var builder);
Language\TagHelperCollection.Builder.cs (2)
24
private static readonly
ArrayBuilderPool
<TagHelperDescriptor> s_arrayBuilderPool =
25
ArrayBuilderPool
<TagHelperDescriptor>.Create(InitialCapacity, MaximumObjectSize);
Microsoft.CodeAnalysis.Razor.Workspaces (9)
CodeActions\CodeActionsService.cs (1)
265
using var _ =
ArrayBuilderPool
<string>.GetPooledObject(out var availableCodeActionNames);
FoldingRanges\FoldingRangeService.cs (1)
29
using var _ =
ArrayBuilderPool
<FoldingRange>.GetPooledObject(out var mappedRanges);
Formatting\FormattingContext.cs (1)
161
using var _ =
ArrayBuilderPool
<FormattingSpan>.GetPooledObject(out var formattingSpans);
Formatting\Passes\CSharpFormattingPass.CSharpDocumentGenerator.cs (1)
89
using var _2 =
ArrayBuilderPool
<LineInfo>.GetPooledObject(out var lineInfoBuilder);
SemanticTokens\AbstractRazorSemanticTokensInfoService.cs (1)
223
using var _ =
ArrayBuilderPool
<LinePositionSpan>.GetPooledObject(out var csharpRanges);
SemanticTokens\AbstractRazorSemanticTokensLegendService.cs (3)
26
using var _ =
ArrayBuilderPool
<string>.GetPooledObject(out var builder);
40
using var _ =
ArrayBuilderPool
<string>.GetPooledObject(out var builder);
54
using var _ =
ArrayBuilderPool
<string>.GetPooledObject(out var builder);
Utilities\AsyncBatchingWorkQueue`2.cs (1)
155
using var _ =
ArrayBuilderPool
<TItem>.GetPooledObject(out var items);