74 references to ToImmutableAndFree
Microsoft.CodeAnalysis.Workspaces (74)
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 (13)
197return builder.ToImmutableAndFree(); 226return builder.ToImmutableAndFree(); 256return builder.ToImmutableAndFree(); 276return builder.ToImmutableAndFree(); 296return builder.ToImmutableAndFree(); 320return builder.ToImmutableAndFree(); 344return builder.ToImmutableAndFree(); 406return builder.ToImmutableAndFree(); 458return builder.ToImmutableAndFree(); 533return builder.ToImmutableAndFree(); 808return builder.ToImmutableAndFree(); 1122return builder.ToImmutableAndFree(); 1190return builder.ToImmutableAndFree();
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (10)
364return builder.ToImmutableAndFree(); 381return builder.ToImmutableAndFree(); 409return builder.ToImmutableAndFree(); 421return builder.ToImmutableAndFree(); 434return builder.ToImmutableAndFree(); 447return builder.ToImmutableAndFree(); 462return builder.ToImmutableAndFree(); 477return builder.ToImmutableAndFree(); 492return builder.ToImmutableAndFree(); 504return 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)
435return results.ToImmutableAndFree(); 458return results.ToImmutableAndFree();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
61symbolSpecifications.ToImmutableAndFree(), 62namingStyles.ToImmutableAndFree(), 63namingRules.ToImmutableAndFree());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
205return builder.ToImmutableAndFree(); 279return builder.ToImmutableAndFree(); 343return 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.cs (2)
363return nullCheckStatements.ToImmutableAndFree().Concat(assignStatements.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)
1624missingDocumentStates.SelectAsArray(kvp => (kvp.Key, kvp.Value.ToImmutableAndFree())),