73 references to ToImmutableAndFree
Microsoft.CodeAnalysis.Workspaces (73)
Classification\Classifier.cs (1)
145return parts.ToImmutableAndFree();
CodeCleanup\AbstractCodeCleanerService.cs (1)
143return builder.ToImmutableAndFree();
CodeFixes\FixAllOccurrences\FixAllState.FixMultipleDiagnosticProvider.cs (1)
56return Task.FromResult<IEnumerable<Diagnostic>>(allDiagnosticsBuilder.ToImmutableAndFree());
Diagnostics\DiagnosticAnalysisResult.cs (1)
151others: diagnosticsWithoutDocumentId.ToImmutableAndFree(),
Diagnostics\Extensions.cs (1)
32return result.ToImmutableAndFree();
Diagnostics\SkippedHostAnalyzersInfo.cs (1)
164skippedDiagnosticIdsForAnalyzer = skippedDiagnosticIdsBuilder.ToImmutableAndFree();
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
173return result.ToImmutableAndFree();
FindSymbols\FindReferences\BaseTypeFinder.cs (1)
91return typesBuilder.ToImmutableAndFree();
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (1)
733return unsortedNodes.ToImmutableAndFree();
Rename\ConflictEngine\DeclarationConflictHelpers.cs (3)
74return builder.ToImmutableAndFree(); 114resultBuilder.Add(signatureBuilder.ToImmutableAndFree()); 115return resultBuilder.ToImmutableAndFree();
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (2)
184return results.ToImmutableAndFree(); 229return results.ToImmutableAndFree();
Serialization\SerializationExtensions.cs (1)
86return builder.ToImmutableAndFree();
Shared\Extensions\ILanguageMetadataExtensions.cs (2)
41return builder.Select(kvp => KeyValuePairUtil.Create(kvp.Key, kvp.Value.ToImmutableAndFree())).ToImmutableDictionary(); 61return map.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree());
Shared\Extensions\ISolutionExtensions.cs (1)
36return results.ToImmutableAndFree();
Shared\Extensions\TokenSemanticInfo.cs (1)
47return result.ToImmutableAndFree();
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (4)
97return builder.ToImmutableAndFree(); 137return builder.ToImmutableAndFree(); 177return builder.ToImmutableAndFree(); 224return builder?.ToImmutableAndFree() ?? ImmutableArray<T>.Empty;
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (1)
97result.Add(key, values.ToImmutableAndFree());
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (16)
197return builder.ToImmutableAndFree(); 226return builder.ToImmutableAndFree(); 256return builder.ToImmutableAndFree(); 276return builder.ToImmutableAndFree(); 296return builder.ToImmutableAndFree(); 318return builder.ToImmutableAndFree(); 342return builder.ToImmutableAndFree(); 366return builder.ToImmutableAndFree(); 390return builder.ToImmutableAndFree(); 415return builder.ToImmutableAndFree(); 477return builder.ToImmutableAndFree(); 529return builder.ToImmutableAndFree(); 604return builder.ToImmutableAndFree(); 879return builder.ToImmutableAndFree(); 1193return builder.ToImmutableAndFree(); 1261return builder.ToImmutableAndFree();
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (11)
364return builder.ToImmutableAndFree(); 381return builder.ToImmutableAndFree(); 425return builder.ToImmutableAndFree(); 437return builder.ToImmutableAndFree(); 450return builder.ToImmutableAndFree(); 463return builder.ToImmutableAndFree(); 475return builder.ToImmutableAndFree(); 490return builder.ToImmutableAndFree(); 505return builder.ToImmutableAndFree(); 520return builder.ToImmutableAndFree(); 532return builder.ToImmutableAndFree();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
338return builder.ToImmutableAndFree();
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
380return tmp.ToImmutableAndFree(); 553dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree()); 721return result.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICompilationExtensions.cs (2)
39return builder.ToImmutableAndFree(); 69return builder.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
447return results.ToImmutableAndFree(); 470return results.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
184return builder.ToImmutableAndFree(); 243return builder.ToImmutableAndFree(); 292return builder.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
308return applicableSymbolKindList.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
36dictionary.Add(key, items.ToImmutableAndFree()); 50result.Add(key, items.ToImmutableAndFree()); 77return builders[0].ToImmutableAndFree(); 88return result.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
319return statements.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (3)
38return result.ToImmutableAndFree(); 72return statements.ToImmutableAndFree(); 169return statements.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
51return result.ToImmutableAndFree();
Workspace\Solution\SolutionCompilationState.cs (1)
1647missingDocumentStates.SelectAsArray(kvp => (kvp.Key, kvp.Value.ToImmutableAndFree())),