23 references to ToImmutableAndClear
Microsoft.CodeAnalysis.Workspaces (23)
CodeActions\CodeAction.cs (1)
442return result.ToImmutableAndClear();
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (4)
280return aliasSymbols.ToImmutableAndClear(); 764return additionalProperties.ToImmutableAndClear(); 791return additionalProperties.ToImmutableAndClear(); 880return result.ToImmutableAndClear();
FindSymbols\SymbolTree\SymbolTreeInfo.cs (3)
186return result.ToImmutableAndClear(); 241return results.ToImmutableAndClear(); 520return builder.ToImmutableAndClear();
FindSymbols\SyntaxTree\SyntaxTreeIndex_Forwarders.cs (1)
68return result.ToImmutableAndClear();
Options\GlobalOptionService.cs (1)
157return values.ToImmutableAndClear();
PatternMatching\PatternMatcher.cs (1)
546? new NormalizedTextSpanCollection(matchSpans.ToImmutableAndClear()).ToImmutableArray()
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (1)
291return new(this.ToImmutableAndClear());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeAlgorithms`2.cs (1)
25return result.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolInfoExtensions.cs (1)
35return result.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\InterceptsLocationUtilities.cs (1)
40return result.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (3)
85_equivalenceVisitors = equivalenceVisitors.ToImmutableAndClear(); 86_getHashCodeVisitors = getHashCodeVisitors.ToImmutableAndClear(); 226return OneOrMany.Create(builder.ToImmutableAndClear());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
215return statements.ToImmutableAndClear();
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (2)
221var newGeneratedDocuments = new TextDocumentStates<SourceGeneratedDocumentState>(generatedDocumentsBuilder.ToImmutableAndClear()); 363var newGeneratedDocuments = new TextDocumentStates<SourceGeneratedDocumentState>(generatedDocumentsBuilder.ToImmutableAndClear());
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (1)
100return new(generators.ToImmutableAndClear(), generatorToAnalyzerReference.ToFrozenDictionary());
Workspace\Solution\SolutionState.cs (1)
1184return result.ToImmutableAndClear();