95 references to GetInstance
Microsoft.CodeAnalysis (95)
CodeGen\ArrayMembers.cs (2)
200
var parameters = ArrayBuilder<ArrayMethodParameterInfo>.
GetInstance
(rank + 1);
308
var parameters = ArrayBuilder<ArrayMethodParameterInfo>.
GetInstance
(rank);
CodeGen\PrivateImplementationDetails.cs (1)
155
ArrayBuilder<SynthesizedStaticField> fieldsBuilder = ArrayBuilder<SynthesizedStaticField>.
GetInstance
(
Collections\ArrayBuilderExtensions.cs (3)
91
var builder = ArrayBuilder<TResult>.
GetInstance
(items.Count);
131
var builder = ArrayBuilder<TResult>.
GetInstance
(items.Count);
171
var builder = ArrayBuilder<TResult>.
GetInstance
(items.Count);
Collections\ImmutableArrayExtensions.cs (4)
191
var builder = ArrayBuilder<TResult>.
GetInstance
(items.Length);
453
var builder = ArrayBuilder<TResult>.
GetInstance
(self.Length);
1088
arrayBuilder = ArrayBuilder<T>.
GetInstance
(capacity: 2);
1182
var builder = ArrayBuilder<TNamedTypeSymbol>.
GetInstance
(count);
Collections\OrderPreservingMultiDictionary.cs (1)
321
arrayBuilder = ArrayBuilder<V>.
GetInstance
(capacity: 2);
Collections\TemporaryArray`1.cs (1)
98
_builder = ArrayBuilder<T>.
GetInstance
(capacity)
CommandLine\AnalyzerConfigSet.cs (3)
128
var sortedAnalyzerConfigs = ArrayBuilder<AnalyzerConfig>.
GetInstance
(analyzerConfigs.Count);
141
var allMatchers = ArrayBuilder<ImmutableArray<SectionNameMatcher?>>.
GetInstance
(_analyzerConfigs.Length);
147
var builder = ArrayBuilder<SectionNameMatcher?>.
GetInstance
(config.NamedSections.Length);
CommandLine\CommonCompiler.cs (3)
301
var configs = ArrayBuilder<AnalyzerConfig>.
GetInstance
(analyzerConfigPaths.Length);
1155
var analyzerOptionsBuilder = hasAnalyzerConfigs ? ArrayBuilder<AnalyzerConfigOptionsResult>.
GetInstance
(generatedSyntaxTrees.Count) : null;
1156
var embeddedTextBuilder = ArrayBuilder<EmbeddedText>.
GetInstance
(generatedSyntaxTrees.Count);
CommandLine\SarifV2ErrorLogger.cs (1)
232
var effectiveSeveritiesBuilder = ArrayBuilder<(string DescriptorId, int DescriptorIndex, ImmutableHashSet<ReportDiagnostic> EffectiveSeverities)>.
GetInstance
(_descriptors.Count);
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
1065
var builder = ArrayBuilder<Diagnostic>.
GetInstance
(reportedDiagnostics.Length);
2629
var filteredNodesToAnalyze = ArrayBuilder<SyntaxNode>.
GetInstance
(nodesToAnalyze.Count);
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
656
var builder = ArrayBuilder<string>.
GetInstance
(source.Count);
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.cs (1)
30
var builder = ArrayBuilder<DiagnosticDescriptor>.
GetInstance
(errorCodes.Length);
Emit\EditAndContinue\DefinitionMap.cs (1)
467
var builder = ArrayBuilder<DebugId>.
GetInstance
(lambda.Parameters.Length);
InternalUtilities\EnumerableExtensions.cs (2)
430
var builder = ArrayBuilder<TResult>.
GetInstance
(source.Count);
443
var builder = ArrayBuilder<TResult>.
GetInstance
(source.Count);
InternalUtilities\FileLockCheck.cs (1)
201
var lockInfos = ArrayBuilder<(int, string)>.
GetInstance
((int)pnProcInfo);
MetadataReader\MetadataDecoder.cs (5)
266
var builder = ArrayBuilder<int>.
GetInstance
(countOfSizes);
402
var argumentsBuilder = ArrayBuilder<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>>.
GetInstance
(argumentCount);
403
var argumentRefersToNoPiaLocalTypeBuilder = ArrayBuilder<bool>.
GetInstance
(argumentCount);
864
var locals = ArrayBuilder<LocalInfo<TypeSymbol>>.
GetInstance
(localCount);
865
var offsets = ArrayBuilder<int>.
GetInstance
(localCount);
MetadataReader\MetadataHelpers.cs (1)
628
var result = ArrayBuilder<T>.
GetInstance
(dots + 1);
MetadataReader\MetadataReaderExtensions.cs (1)
64
var result = ArrayBuilder<AssemblyIdentity>.
GetInstance
(reader.AssemblyReferences.Count);
MetadataReader\PEAssembly.cs (2)
67
var refCounts = ArrayBuilder<int>.
GetInstance
(modules.Length);
69
var refs = ArrayBuilder<AssemblyIdentity>.
GetInstance
(totalRefCount);
MetadataReader\PEModule.cs (6)
1648
var result = ArrayBuilder<string>.
GetInstance
(attrInfos.Count);
1688
var whenTrue = ArrayBuilder<string>.
GetInstance
(attrInfos.Count);
1689
var whenFalse = ArrayBuilder<string>.
GetInstance
(attrInfos.Count);
1728
var result = ArrayBuilder<string>.
GetInstance
(attrInfos.Count);
2423
var boolArrayBuilder = ArrayBuilder<bool>.
GetInstance
((int)arrayLen);
2452
var byteArrayBuilder = ArrayBuilder<byte>.
GetInstance
((int)arrayLen);
MetadataReader\TypeNameDecoder.cs (2)
224
var typeArgumentsBuilder = ArrayBuilder<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>>.
GetInstance
(count);
225
var refersToNoPiaBuilder = ArrayBuilder<bool>.
GetInstance
(count);
MetadataReference\AssemblyIdentity.cs (1)
441
var result = ArrayBuilder<byte>.
GetInstance
(PublicKeyTokenSize);
MetadataReference\AssemblyIdentity.DisplayName.cs (1)
708
var bytes = ArrayBuilder<byte>.
GetInstance
(length);
Operations\ControlFlowGraphBuilder.BasicBlockBuilder.cs (1)
238
var branches = ArrayBuilder<ControlFlowBranch>.
GetInstance
(_predecessors?.Count ?? 2);
Operations\ControlFlowGraphBuilder.cs (10)
174
var builder = ArrayBuilder<BasicBlock>.
GetInstance
(blockBuilders.Count);
2007
var builder = ArrayBuilder<T>.
GetInstance
(numElements);
3969
var resourceQueue = ArrayBuilder<(IVariableDeclarationOperation, IVariableDeclaratorOperation)>.
GetInstance
(declarationGroup.Declarations.Length);
6386
var initializerBuilder = ArrayBuilder<IOperation>.
GetInstance
(operation.Initializers.Length);
6519
var builder = ArrayBuilder<IOperation>.
GetInstance
(initializer.ElementValues.Length);
6697
var elementBuilder = ArrayBuilder<IOperation>.
GetInstance
(numElements);
7045
var partsBuilder = ArrayBuilder<IInterpolatedStringContentOperation>.
GetInstance
(operation.Parts.Length);
7247
var builder = ArrayBuilder<IArgumentOperation>.
GetInstance
(propertySymbol.Parameters.Length);
7818
ArrayBuilder<IOperation> statementsBuilder = ArrayBuilder<IOperation>.
GetInstance
(statements.Length);
7976
var initializerBuilder = ArrayBuilder<IOperation>.
GetInstance
(initializers.Length);
Operations\ControlFlowGraphBuilder.RegionBuilder.cs (1)
321
var builder = ArrayBuilder<ControlFlowRegion>.
GetInstance
(Regions.Count);
Operations\IOperation.OperationList.cs (1)
47
var builder = ArrayBuilder<IOperation>.
GetInstance
(Count);
Operations\IOperation.OperationList.Reversed.cs (2)
50
var builder = ArrayBuilder<IOperation>.
GetInstance
(Count);
60
var builder = ArrayBuilder<IOperation>.
GetInstance
(input.Length);
PEWriter\ExtendedPEBuilder.cs (1)
57
var builder = ArrayBuilder<Section>.
GetInstance
(baseSections.Length + 1);
PEWriter\MetadataWriter.cs (2)
605
builder = ArrayBuilder<IParameterDefinition>.
GetInstance
(parameters.Length + 1);
629
builder = ArrayBuilder<IParameterDefinition>.
GetInstance
(parameters.Length);
ReferenceManager\AssemblyDataForAssemblyBeingBuilt.cs (1)
40
var refs = ArrayBuilder<AssemblyIdentity>.
GetInstance
(builderSize);
ReferenceManager\CommonReferenceManager.Binding.cs (3)
445
var result = ArrayBuilder<int>.
GetInstance
(modules.Length);
465
var result = ArrayBuilder<ResolvedReference>.
GetInstance
(references.Length);
480
var bindingsOfAssemblyBeingBuilt = ArrayBuilder<AssemblyReferenceBinding>.
GetInstance
(referenceBindingsOfAssemblyBeingBuilt.Length + implicitAssemblies.Count);
ReferenceManager\CommonReferenceManager.State.cs (1)
474
var aliasesOfReferencedAssembliesBuilder = ArrayBuilder<ImmutableArray<string>>.
GetInstance
(referenceMap.Length - referencedModuleCount);
ReferenceManager\MergedAliases.cs (1)
84
var result = ArrayBuilder<string>.
GetInstance
(aliasesOpt.Length);
SourceFileResolver.cs (1)
62
var pathMapBuilder = ArrayBuilder<KeyValuePair<string, string>>.
GetInstance
(pathMap.Length);
SourceGeneration\GeneratorDriver.cs (4)
97
var states = ArrayBuilder<GeneratorState>.
GetInstance
(generators.Length);
194
ArrayBuilder<GeneratedSourceResult> sources = ArrayBuilder<GeneratedSourceResult>.
GetInstance
(generatorState.PostInitTrees.Length + generatorState.GeneratedTrees.Length);
224
var stateBuilder = ArrayBuilder<GeneratorState>.
GetInstance
(state.Generators.Length);
371
var trees = ArrayBuilder<GeneratedSyntaxTree>.
GetInstance
(generatedSources.Length);
SourceGeneration\GlobalAliases.cs (1)
42
var total = ArrayBuilder<(string aliasName, string symbolName)>.
GetInstance
(aliasesArray.Sum(a => a.AliasAndSymbolNames.Length));
SourceGeneration\Nodes\BatchNode.cs (1)
97
var builder = ArrayBuilder<TInput>.
GetInstance
(entryCount);
SourceGeneration\Nodes\NodeStateTable.cs (5)
160
var compacted = ArrayBuilder<TableEntry>.
GetInstance
(nonRemovedCount);
256
_states = ArrayBuilder<TableEntry>.
GetInstance
(tableCapacity ?? previous.GetTotalEntryItemCount());
485
var stepOutputBuilder = ArrayBuilder<(object, IncrementalStepRunReason)>.
GetInstance
(outputInfo.Count);
730
_items = ArrayBuilder<T>.
GetInstance
(capacity);
750
_states = ArrayBuilder<EntryState>.
GetInstance
(_requestedCapacity);
SourceGeneration\SyntaxStore.cs (1)
62
var syntaxInputBuilders = ArrayBuilder<(SyntaxInputNode node, ISyntaxInputBuilder builder)>.
GetInstance
(_syntaxInputNodes.Length);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (7)
130
var builder = ArrayBuilder<short>.
GetInstance
(numCounts);
179
var builder = ArrayBuilder<StateMachineHoistedLocalScope>.
GetInstance
(bucketCount);
245
var flagsBuilder = ArrayBuilder<bool>.
GetInstance
(FlagBytesCount);
251
var builder = ArrayBuilder<DynamicLocalInfo>.
GetInstance
(bucketCount);
304
var builder = ArrayBuilder<TupleElementNamesInfo>.
GetInstance
(n);
316
var builder = ArrayBuilder<string>.
GetInstance
(n);
422
var resultBuilder = ArrayBuilder<ImmutableArray<string>>.
GetInstance
(groupSizes.Length);
src\Dependencies\PooledObjects\ArrayBuilder.cs (2)
374
var tmp = ArrayBuilder<U>.
GetInstance
(Count);
708
var result = ArrayBuilder<S>.
GetInstance
(Count);
Syntax\LineDirectiveMap.cs (1)
141
var entries = ArrayBuilder<LineMappingEntry>.
GetInstance
(directives.Count + 1);
Text\LargeText.cs (1)
96
var chunks = ArrayBuilder<char[]>.
GetInstance
(1 + maxCharRemainingGuess / ChunkSize);
Text\LargeTextWriter.cs (1)
26
_chunks = ArrayBuilder<char[]>.
GetInstance
(1 + length / LargeText.ChunkSize);