100 references to ToImmutableAndClear
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
StringCopyPaste\StringInfo.cs (1)
222contentSpans: result.ToImmutableAndClear());
StringCopyPaste\UnknownSourcePasteProcessor.cs (1)
99return textChanges.ToImmutableAndClear();
Microsoft.CodeAnalysis.CSharp.Features (11)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.NameGenerator.cs (2)
65return result.ToImmutableAndClear(); 97return result.ToImmutableAndClear();
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
126Implement, nestedActions.ToImmutableAndClear(), isInlinable: true));
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
209return result.ToImmutableAndClear();
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
100return result.ToImmutableAndClear();
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
165return diagnostics.ToImmutableAndClear();
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
137return result.ToImmutableAndClear();
StringIndentation\CSharpStringIndentationService.cs (1)
75return result.ToImmutableAndClear();
Structure\Providers\BlockSyntaxStructureProvider.cs (2)
67subHeadings.ToImmutableAndClear(), 88subHeadings.ToImmutableAndClear(),
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (1)
191return result.ToImmutableAndClear();
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaListExtensions.cs (2)
62result.Add(currentLine.ToImmutableAndClear()); 66return result.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (2)
204return builder.ToImmutableAndClear(); 216return builder.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
905localVariables = variables.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (1)
119return [.. tokens.ToImmutableAndClear()];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1489return result.ToImmutableAndClear();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Utilities\PatternMatcherTests.cs (2)
441return result.ToImmutableAndClear(); 497return matches.ToImmutableAndClear();
Microsoft.CodeAnalysis.Features (47)
Completion\Providers\AbstractAwaitCompletionProvider.cs (2)
110var properties = builder.ToImmutableAndClear(); 122var properties = builder.ToImmutableAndClear();
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
185var symbolList = symbolListBuilder.ToImmutableAndClear();
Completion\Providers\Scripting\AbstractLoadDirectiveCompletionProvider.cs (1)
35return builder.ToImmutableAndClear();
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
107result.ToImmutableAndClear(),
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
160return scopes.ToImmutableAndClear();
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
251_ => OneOrMany.Create(result.ToImmutableAndClear())
EmbeddedLanguages\Classification\AbstractFallbackEmbeddedLanguageClassifier.cs (1)
29_supportedKinds = array.ToImmutableAndClear();
EmbeddedLanguages\EmbeddedLanguageInfo.cs (1)
37AllStringLiteralKinds = array.ToImmutableAndClear();
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
79return builder.ToImmutableAndClear();
FindUsages\DefinitionItem.DetachedDefinitionItem.cs (2)
96converted.ToImmutableAndClear(), convertedClassifiedSpans.ToImmutableAndClear(),
FindUsages\DefinitionItemFactory.cs (2)
218return metadataLocations.ToImmutableAndClear(); 245return source.ToImmutableAndClear();
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (1)
290return result.ToImmutableAndClear();
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
137return result.ToImmutableAndClear();
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (2)
185return (actionsBuilder.ToImmutableAndClear(), actionsBuilderAllOccurrences.ToImmutableAndClear());
NavigateTo\AbstractNavigateToSearchService.InProcess.cs (3)
160matchedSpans.ToImmutableAndClear(), 161allPatternMatches.ToImmutableAndClear()); 182return result.ToImmutableAndClear();
NavigateTo\NavigateToSearcher.cs (3)
307result.Add(buffer.ToImmutableAndClear()); 317result.Add(buffer.ToImmutableAndClear()); 319return result.ToImmutableAndClear();
QuickInfo\CommonQuickInfoProvider.cs (1)
64return result.ToImmutableAndClear();
QuickInfo\IndentationHelper.cs (1)
80return adjustedClassifiedSpans.ToImmutableAndClear();
QuickInfo\Presentation\QuickInfoContentBuilder.cs (3)
87elements[0] = new QuickInfoContainerElement(QuickInfoContainerStyle.Wrapped, firstLineElements.ToImmutableAndClear()); 168elements.Add(new QuickInfoClassifiedTextElement(textRuns.ToImmutableAndClear())); 180elements.ToImmutableAndClear());
QuickInfo\Presentation\TaggedTextExtensions.cs (6)
146_lines.Add(ClassifiedText(_runs.ToImmutableAndClear())); 172_lines.Add(ClassifiedText(_runs.ToImmutableAndClear())); 191_lines.Add(WrappedContainer(newElements.ToImmutableAndClear())); 198_lines.Add(ClassifiedText(_runs.ToImmutableAndClear())); 206return _paragraphs.ToImmutableAndClear(); 224var container = StackedContainer(_lines.ToImmutableAndClear());
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
108var matchKindsArray = matchKinds.ToImmutableAndClear();
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (2)
78var matchKindsArray = matchKinds.ToImmutableAndClear(); 162return locations.ToImmutableAndClear();
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
112CodeAction.Create(AnalyzersResources.Add_explicit_cast, actions.ToImmutableAndClear(), isInlinable: false),
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
326return builder.ToImmutableAndClear();
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
124return result.ToImmutableAndClear();
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
117return result.ToImmutableAndClear();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (1)
54return result.ToImmutableAndClear();
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
171return operations.ToImmutableAndClear();
SymbolSearch\Windows\SymbolSearchUpdateEngine.cs (2)
149return ValueTaskFactory.FromResult(results.ToImmutableAndClear()); 267return result.ToImmutableAndClear();
Wrapping\AbstractCodeActionComputer.cs (1)
309return WrapItemsAction.SortActionsByMostRecentlyUsed(result.ToImmutableAndClear());
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Completion\CompletionResultFactory.cs (1)
232return [.. result.ToImmutableAndClear()];
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\RemoteWorkspace.InFlightSolution.cs (1)
186return solutions.ToImmutableAndClear();
Services\DiagnosticAnalyzer\RemoteDiagnosticAnalyzerService.cs (1)
100return builder.ToImmutableAndClear();
Microsoft.CodeAnalysis.Workspaces (27)
CodeActions\CodeAction.cs (1)
444return result.ToImmutableAndClear();
Diagnostics\DiagnosticAnalysisResult.cs (1)
129return result.ToImmutableAndClear();
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (4)
281return aliasSymbols.ToImmutableAndClear(); 767return additionalProperties.ToImmutableAndClear(); 794return additionalProperties.ToImmutableAndClear(); 883return result.ToImmutableAndClear();
FindSymbols\FindReferences\Finders\MethodTypeParameterSymbolReferenceFinder.cs (1)
76return FindDocumentsAsync(project, documents, processResult, processResultData, cancellationToken, names.ToImmutableAndClear());
FindSymbols\SymbolTree\SymbolTreeInfo.cs (3)
187return result.ToImmutableAndClear(); 242return results.ToImmutableAndClear(); 521return builder.ToImmutableAndClear();
FindSymbols\SyntaxTree\SyntaxTreeIndex_Forwarders.cs (1)
71return result.ToImmutableAndClear();
Options\GlobalOptionService.cs (1)
116return values.ToImmutableAndClear();
PatternMatching\PatternMatcher.cs (1)
547? new NormalizedTextSpanCollection(matchSpans.ToImmutableAndClear()).ToImmutableArray()
src\Dependencies\Collections\TemporaryArray`1.cs (1)
294return new(this.ToImmutableAndClear());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeAlgorithms`2.cs (1)
26return result.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolInfoExtensions.cs (1)
36return result.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (1)
79return words.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\InterceptsLocationUtilities.cs (1)
41return result.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
87_equivalenceVisitors = equivalenceVisitors.ToImmutableAndClear(); 88_getHashCodeVisitors = getHashCodeVisitors.ToImmutableAndClear(); 228return OneOrMany.Create(builder.ToImmutableAndClear());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (1)
98return result.ToImmutableAndClear();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
210return statements.ToImmutableAndClear();
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (2)
223var newGeneratedDocuments = new TextDocumentStates<SourceGeneratedDocumentState>(generatedDocumentsBuilder.ToImmutableAndClear()); 365var newGeneratedDocuments = new TextDocumentStates<SourceGeneratedDocumentState>(generatedDocumentsBuilder.ToImmutableAndClear());
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (1)
101return new(generators.ToImmutableAndClear(), generatorToAnalyzerReference.ToFrozenDictionary());
Workspace\Solution\SolutionState.cs (1)
1209return result.ToImmutableAndClear();
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\BKTreeTests.cs (1)
20return results.ToImmutableAndClear();