74 references to ToImmutableAndFree
Microsoft.CodeAnalysis.Workspaces (74)
Classification\Classifier.cs (1)
145
return parts.
ToImmutableAndFree
();
CodeCleanup\AbstractCodeCleanerService.cs (1)
143
return builder.
ToImmutableAndFree
();
CodeFixes\FixAllOccurrences\FixAllState.FixMultipleDiagnosticProvider.cs (1)
56
return Task.FromResult<IEnumerable<Diagnostic>>(allDiagnosticsBuilder.
ToImmutableAndFree
());
Diagnostics\DiagnosticAnalysisResult.cs (1)
151
others: diagnosticsWithoutDocumentId.
ToImmutableAndFree
(),
Diagnostics\Extensions.cs (1)
32
return result.
ToImmutableAndFree
();
Diagnostics\SkippedHostAnalyzersInfo.cs (1)
164
skippedDiagnosticIdsForAnalyzer = skippedDiagnosticIdsBuilder.
ToImmutableAndFree
();
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
173
return result.
ToImmutableAndFree
();
FindSymbols\FindReferences\BaseTypeFinder.cs (1)
91
return typesBuilder.
ToImmutableAndFree
();
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (1)
733
return unsortedNodes.
ToImmutableAndFree
();
Rename\ConflictEngine\DeclarationConflictHelpers.cs (3)
74
return builder.
ToImmutableAndFree
();
114
resultBuilder.Add(signatureBuilder.
ToImmutableAndFree
());
115
return resultBuilder.
ToImmutableAndFree
();
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (2)
184
return results.
ToImmutableAndFree
();
229
return results.
ToImmutableAndFree
();
Serialization\SerializationExtensions.cs (1)
86
return builder.
ToImmutableAndFree
();
Shared\Extensions\ILanguageMetadataExtensions.cs (2)
41
return builder.Select(kvp => KeyValuePairUtil.Create(kvp.Key, kvp.Value.
ToImmutableAndFree
())).ToImmutableDictionary();
61
return map.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.
ToImmutableAndFree
());
Shared\Extensions\ISolutionExtensions.cs (1)
36
return results.
ToImmutableAndFree
();
Shared\Extensions\TokenSemanticInfo.cs (1)
47
return result.
ToImmutableAndFree
();
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (4)
97
return builder.
ToImmutableAndFree
();
137
return builder.
ToImmutableAndFree
();
177
return builder.
ToImmutableAndFree
();
224
return builder?.
ToImmutableAndFree
() ?? ImmutableArray<T>.Empty;
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (1)
97
result.Add(key, values.
ToImmutableAndFree
());
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (13)
197
return builder.
ToImmutableAndFree
();
226
return builder.
ToImmutableAndFree
();
256
return builder.
ToImmutableAndFree
();
276
return builder.
ToImmutableAndFree
();
296
return builder.
ToImmutableAndFree
();
320
return builder.
ToImmutableAndFree
();
344
return builder.
ToImmutableAndFree
();
406
return builder.
ToImmutableAndFree
();
458
return builder.
ToImmutableAndFree
();
533
return builder.
ToImmutableAndFree
();
808
return builder.
ToImmutableAndFree
();
1122
return builder.
ToImmutableAndFree
();
1190
return builder.
ToImmutableAndFree
();
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (10)
364
return builder.
ToImmutableAndFree
();
381
return builder.
ToImmutableAndFree
();
409
return builder.
ToImmutableAndFree
();
421
return builder.
ToImmutableAndFree
();
434
return builder.
ToImmutableAndFree
();
447
return builder.
ToImmutableAndFree
();
462
return builder.
ToImmutableAndFree
();
477
return builder.
ToImmutableAndFree
();
492
return builder.
ToImmutableAndFree
();
504
return builder.
ToImmutableAndFree
();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
338
return builder.
ToImmutableAndFree
();
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
380
return tmp.
ToImmutableAndFree
();
553
dictionary.Add(pair.Key, pair.Value.
ToImmutableAndFree
());
721
return result.
ToImmutableAndFree
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICompilationExtensions.cs (2)
39
return builder.
ToImmutableAndFree
();
69
return builder.
ToImmutableAndFree
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
435
return results.
ToImmutableAndFree
();
458
return results.
ToImmutableAndFree
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
61
symbolSpecifications.
ToImmutableAndFree
(),
62
namingStyles.
ToImmutableAndFree
(),
63
namingRules.
ToImmutableAndFree
());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
205
return builder.
ToImmutableAndFree
();
279
return builder.
ToImmutableAndFree
();
343
return builder.
ToImmutableAndFree
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
308
return applicableSymbolKindList.
ToImmutableAndFree
();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
36
dictionary.Add(key, items.
ToImmutableAndFree
());
50
result.Add(key, items.
ToImmutableAndFree
());
77
return builders[0].
ToImmutableAndFree
();
88
return result.
ToImmutableAndFree
();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (2)
363
return nullCheckStatements.
ToImmutableAndFree
().Concat(assignStatements.
ToImmutableAndFree
());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
319
return statements.
ToImmutableAndFree
();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
38
return result.
ToImmutableAndFree
();
72
return statements.
ToImmutableAndFree
();
169
return statements.
ToImmutableAndFree
();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
51
return result.
ToImmutableAndFree
();
Workspace\Solution\SolutionCompilationState.cs (1)
1624
missingDocumentStates.SelectAsArray(kvp => (kvp.Key, kvp.Value.
ToImmutableAndFree
())),