184 references to ToImmutable
AnalyzerRunner (1)
Options.cs (1)
243incrementalAnalyzerNames: incrementalAnalyzerNames.ToImmutable());
Aspire.Hosting (6)
ApplicationModel\ResourceNotificationService.cs (1)
442return previousState with { Commands = builder.ToImmutable() };
Dcp\ApplicationExecutor.cs (3)
652return ports.ToImmutable(); 790return urls.ToImmutable(); 824return environment.ToImmutable();
Dcp\DcpNameGenerator.cs (1)
54AddInstancesAnnotation(resource, builder.ToImmutable());
Health\ResourceHealthCheckService.cs (1)
185return builder.ToImmutable();
DesignSurfaceExt (1)
TypeDiscoveryService.cs (1)
52return builder.ToImmutable();
illink (1)
ILLink.CodeFixProvider (1)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
59 return diagDescriptorsArrayBuilder.ToImmutable ();
ILLink.RoslynAnalyzer (4)
DataFlow\ControlFlowGraphProxy.cs (1)
88 finallyRegions.ToImmutable (),
DynamicallyAccessedMembersAnalyzer.cs (1)
68 return diagDescriptorsArrayBuilder.ToImmutable ();
RequiresAssemblyFilesAnalyzer.cs (1)
99 return dangerousPatternsBuilder.ToImmutable ();
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (1)
66 argumentsBuilder.ToImmutable (),
Microsoft.AspNetCore.Analyzers (4)
MiddlewareAnalyzer.cs (1)
44_context.ReportAnalysis(new MiddlewareAnalysis(configureMethod, middleware.ToImmutable()));
OptionsAnalyzer.cs (1)
40_context.ReportAnalysis(new OptionsAnalysis(configureServicesMethod, options.ToImmutable()));
ServicesAnalyzer.cs (1)
39_context.ReportAnalysis(new ServicesAnalysis(configureServicesMethod, services.ToImmutable()));
StartupAnalysis.cs (1)
53return items.ToImmutable();
Microsoft.AspNetCore.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
40return references.ToImmutable();
Microsoft.AspNetCore.App.Analyzers (13)
Infrastructure\RoutePattern\RoutePatternParser.cs (8)
81return new RoutePatternTree(_lexer.Text, root, diagnostics.ToImmutable(), routeParameters.ToImmutable()); 277var routeParameter = new RouteParameter(name, encodeSlashes, defaultValue, hasOptional, hasCatchAll, policies.ToImmutable(), parameterNode.GetSpan()); 357return result.ToImmutable(); 377return new(result.ToImmutable()); 553return parts.ToImmutable(); 557return parts.ToImmutable(); 611return new(colonToken, fragments.ToImmutable());
Mvc\MvcAnalyzer.cs (1)
139return httpMethodsBuilder.ToImmutable();
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
447return builder.ToImmutable();
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (1)
40return resolvedParameterSymbols.ToImmutable();
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (1)
185return httpMethodsBuilder.ToImmutable();
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (1)
69return ImmutableArray.Create(new AspNetCoreDocumentHighlights(highlightSpans.ToImmutable()));
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (1)
18public static ImmutableArray<TElement> ToResult(ImmutableArray<TElement>.Builder buffer) => buffer.ToImmutable();
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (1)
18public static ImmutableArray<TElement> ToResult(ImmutableArray<TElement>.Builder buffer) => buffer.ToImmutable();
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
33result.Add((entry.Key, index, entry.Value.ToImmutable()));
StaticRouteHandlerModel\EndpointParameter.cs (1)
50ProcessEndpointParameterSource(endpoint, property, attributeBuilder.ToImmutable(), wellKnownTypes);
Microsoft.Build (5)
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (1)
129return new EditorConfigFile(globalSection!, namedSectionBuilder.ToImmutable());
Evaluation\LazyItemEvaluator.IncludeOperation.cs (2)
34_metadata = builder.Metadata.ToImmutable(); 142return itemsToAdd?.ToImmutable() ?? ImmutableArray<I>.Empty;
Evaluation\LazyItemEvaluator.UpdateOperation.cs (1)
27_metadata = builder.Metadata.ToImmutable();
Globbing\CompositeGlob.cs (1)
137return new CompositeGlob(builder.ToImmutable());
Microsoft.CodeAnalysis (16)
AssemblyUtilities.cs (1)
51return builder.ToImmutable();
CommandLine\AnalyzerConfig.cs (1)
262return new AnalyzerConfig(globalSection!, namedSectionBuilder.ToImmutable(), pathToFile);
CommandLine\CommandLineArguments.cs (2)
558generators = generatorBuilder.ToImmutable(); 559analyzers = analyzerBuilder.ToImmutable();
DiagnosticAnalyzer\AnalysisResult.cs (1)
105return builder.ToImmutable();
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1226return builder.ToImmutable();
DiagnosticAnalyzer\AnalyzerFileReference.cs (2)
416return builder.ToImmutable(); 448return builder.ToImmutable();
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
210return builder.ToImmutable();
MemberDescriptor.cs (2)
154builder.Add(new MemberDescriptor(flags, declaringTypeId, nameTable[i], signatureBuilder.ToImmutable(), arity)); 158return builder.ToImmutable();
MetadataReader\PEModule.cs (1)
450return builder.ToImmutable();
MetadataReference\AssemblyMetadata.cs (1)
338modules = moduleBuilder.ToImmutable();
RuleSet\RuleSet.cs (1)
197return arrayBuilder.ToImmutable();
RuleSet\RuleSetProcessor.cs (1)
140return new RuleSet(filePath, generalOption, specificOptions.ToImmutable(), includes.ToImmutable());
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
78return _builder.ToImmutable();
Microsoft.CodeAnalysis.CodeStyle (4)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
78return _builder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
351internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
57public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
51var result = builder.ToImmutable();
Microsoft.CodeAnalysis.CSharp (2)
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
865@params = builder.ToImmutable(); 951return ownedParams.ToImmutable();
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
294internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
285internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
303return (deduplicatedUsingsBuilder.ToImmutable(), orphanedTrivia);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
LanguageServer\CSharpLspBuildOnlyDiagnosticsTests.cs (1)
36return builder.ToImmutable();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1535var trees = builder.ToImmutable();
Microsoft.CodeAnalysis.CSharp.Features (3)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (1)
60public ImmutableArray<Diagnostic> Diagnostics => _diagnostics?.ToImmutable() ?? [];
SplitOrMergeIfStatements\CSharpIfLikeStatementGenerator.cs (1)
103return builder.ToImmutable();
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
303return (deduplicatedUsingsBuilder.ToImmutable(), orphanedTrivia);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
294internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
285internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
Microsoft.CodeAnalysis.EditorFeatures (2)
FindUsages\BufferedFindUsagesContext.cs (1)
86return _state.Definitions.ToImmutable();
IntelliSense\AsyncCompletion\FilterSet.cs (1)
95s_filters = arrayBuilder.ToImmutable();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EmbeddedLanguages\StackFrame\StackFrameSyntaxFactory.cs (1)
86return builder.ToImmutable();
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (11)
CSharp\MemberSignatureParser.cs (4)
27var parser = new MemberSignatureParser(builder.ToImmutable()); 113return builder.ToImmutable(); 184return builder.ToImmutable(); 273return builder.ToImmutable();
MetadataDecoder.cs (2)
45return builder.ToImmutable(); 182return builder.ToImmutable();
MetadataResolver.cs (1)
306return builder.ToImmutable();
VisualBasic\MemberSignatureParser.cs (4)
31var parser = new MemberSignatureParser(builder.ToImmutable()); 132return builder.ToImmutable(); 210return builder.ToImmutable(); 313return builder.ToImmutable();
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
FunctionResolverTestBase.cs (1)
209return builder.ToImmutable();
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (1)
64return dummyDescriptors.ToImmutable();
Microsoft.CodeAnalysis.Features (13)
ChangeSignature\AbstractChangeSignatureService.cs (1)
741return (newParameters.ToImmutable(), GetSeparators(list, numSeparatorsToSkip));
Common\GlyphExtensions.cs (1)
27return builder.ToImmutable();
Completion\CommonCompletionItem.cs (1)
93return CompletionDescription.Create(builder.ToImmutable());
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (1)
307return state.Builder.ToImmutable();
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (1)
173s_descriptors = builder.ToImmutable();
QuickInfo\QuickInfoUtilities.cs (7)
49AddSection(QuickInfoSectionKinds.Description, builder.ToImmutable()); 64AddSection(QuickInfoSectionKinds.Description, builder.ToImmutable()); 90AddSection(QuickInfoSectionKinds.RemarksDocumentationComments, builder.ToImmutable()); 99AddSection(QuickInfoSectionKinds.ReturnsDocumentationComments, builder.ToImmutable()); 108AddSection(QuickInfoSectionKinds.ValueDocumentationComments, builder.ToImmutable()); 116AddSection(QuickInfoSectionKinds.TypeParameters, builder.ToImmutable()); 124AddSection(QuickInfoSectionKinds.AnonymousTypes, builder.ToImmutable());
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
178var reference = new ReferenceInfo(referenceType, itemSpecification, treatAsUsed, compilationAssemblies.ToImmutable(), dependencies);
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
78return _builder.ToImmutable();
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (2)
64_watchedDirectories = watchedDirectoriesBuilder.ToImmutable(); 65_directoryFileSystemWatchers = watcherBuilder.ToImmutable();
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Features\FindUsages\SimpleFindUsagesContext.cs (2)
47return _definitionItems.ToImmutable(); 55return _referenceItems.ToImmutable();
RoslynLanguageServer.cs (1)
110ImmutableArray<BaseService>.Builder builder => builder.ToImmutable(),
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Completion\CompletionFeaturesTests.cs (2)
608return CodeAnalysis.Completion.CompletionList.Create(defaultItemSpan, builder.ToImmutable()); 939mockService.ReturnedItems = builder.ToImmutable();
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
78return _builder.ToImmutable();
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
344return builder.ToImmutable();
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\RemoteWorkspace.SolutionCreator.cs (2)
501project = addDocuments(project.Solution, lazyDocumentsToAdd.ToImmutable()).GetProject(project.Id)!; 518project = removeDocuments(project.Solution, lazyDocumentsToRemove.ToImmutable()).GetProject(project.Id)!;
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
478var modules = (moduleBuilder != null) ? moduleBuilder.ToImmutable() : ImmutableArray.Create(manifestModule);
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2197SupportedSuppressions = builder.ToImmutable();
Microsoft.CodeAnalysis.UnitTests (6)
Analyzers\AnalyzerFileReferenceTests.cs (6)
152var analyzers = builder.ToImmutable(); 171var analyzers = builder.ToImmutable(); 188var analyzers = builder.ToImmutable(); 248var analyzers = builder.ToImmutable(); 266var analyzers = builder.ToImmutable(); 288var analyzers = builder.ToImmutable();
Microsoft.CodeAnalysis.VisualBasic (3)
Compilation\VisualBasicCompilerDiagnosticAnalyzer.vb (1)
36Return builder.ToImmutable
Symbols\Metadata\PE\PEMethodSymbol.vb (2)
1030params = builder.ToImmutable() 1102Return ownedParams.ToImmutable()
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (1)
58Return If(_diagnostics?.ToImmutable(), ImmutableArray(Of Diagnostic).Empty)
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
58Return typeItems.ToImmutable()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.vb (1)
882Dim trees = builder.ToImmutable()
Microsoft.CodeAnalysis.Workspaces (10)
Diagnostics\HostDiagnosticAnalyzers.cs (1)
174builder.Add(referenceId, descriptors.ToImmutable());
Shared\Utilities\DocumentationComment.cs (3)
159_comment.ParameterNames = _parameterNamesBuilder == null ? [] : _parameterNamesBuilder.ToImmutable(); 160_comment.TypeParameterNames = _typeParameterNamesBuilder == null ? [] : _typeParameterNamesBuilder.ToImmutable(); 161_comment.ExceptionTypes = _exceptionTypesBuilder == null ? [] : _exceptionTypesBuilder.ToImmutable();
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
78return _builder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
351internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
57public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
51var result = builder.ToImmutable();
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
607documentFileNamesAdded = documentFileNamesAddedBuilder.ToImmutable();
Workspace\Solution\ProjectDependencyGraph_AddProject.cs (1)
32newDependencySets = builder.ToImmutable();
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildProjectLoader.cs (1)
224projectPaths.ToImmutable(),
MSBuild\MSBuildProjectLoader.Worker.cs (1)
267results = builder.ToImmutable();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
296return _builder.ToImmutable();
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
78return _builder.ToImmutable();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
51var result = builder.ToImmutable();
Microsoft.Interop.ComInterfaceGenerator (9)
ComClassInfo.cs (1)
68new(names.ToImmutable())));
ComInterfaceGenerator.cs (2)
464contextList.Add(new(iface, methodList.ToImmutable().ToSequenceEqual())); 466return contextList.ToImmutable();
ComInterfaceInfo.cs (1)
173return builder.ToImmutable();
ComMethodInfo.cs (1)
63return methods.ToImmutable().ToSequenceEqual();
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
67return projectsWithDiagnostics.ToImmutable();
VirtualMethodPointerStubGenerator.cs (3)
196return elements.ToImmutable(); 231return elements.ToImmutable(); 318return callingConventions.ToImmutable();
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
67return projectsWithDiagnostics.ToImmutable();
Microsoft.Interop.SourceGeneration (13)
BoundGenerators.cs (3)
92generatorBindingDiagnostics = generatorDiagnostics.ToImmutable(); 123NativeParameterMarshallers = nativeParamMarshallers.ToImmutable(), 124ManagedParameterMarshallers = managedParamMarshallers.ToImmutable(),
ContainingSyntaxContext.cs (1)
63return containingTypeInfoBuilder.ToImmutable();
GeneratedStatements.cs (1)
88return statementsToUpdate.ToImmutable();
SignatureContext.cs (2)
97AdditionalAttributes = additionalAttrs.ToImmutable(), 131return typeInfos.ToImmutable();
TypeSymbolExtensions.cs (2)
324return (typeArguments.ToImmutable(), nullableAnnotations.ToImmutable());
VariableDeclarations.cs (4)
51Initializations = initializations.ToImmutable(), 52Variables = variables.ToImmutable() 108Initializations = initializations.ToImmutable(), 109Variables = variables.ToImmutable()
Microsoft.ML.Transforms (2)
Text\LdaTransform.cs (2)
352return new ModelParameters(itemScoresPerTopicBuilder.ToImmutable()); 369return new ModelParameters(wordScoresPerTopicBuilder.ToImmutable());
Microsoft.VisualStudio.LanguageServices (6)
Library\ObjectBrowser\AbstractListItemFactory.cs (1)
225return CreateListItemsFromSymbols(symbolBuilder.ToImmutable(), compilation, projectId, CreateSimpleTypeListItem);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Search.cs (3)
63return new ObjectList(ObjectListKind.Namespaces, flags, this, builder.ToImmutable()); 84return new ObjectList(ObjectListKind.Types, flags, this, builder.ToImmutable()); 105return new ObjectList(ObjectListKind.Types, flags, this, builder.ToImmutable());
Library\VsNavInfo\NavInfo.cs (2)
83return builder.ToImmutable(); 111nodes = builder.ToImmutable();
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (1)
186Return runtimes.ToImmutable()
Mvc.Analyzers.Test (1)
src\Shared\AnalyzerTesting\TestReferences.cs (1)
40return references.ToImmutable();
RunTests (1)
TestRunner.cs (1)
411return new RunAllResult((failures == 0), completed.ToImmutableArray(), processResults.ToImmutable());
System.Reflection.Metadata (7)
System\Reflection\Metadata\Internal\NamespaceCache.cs (3)
443var namespaces = Namespaces!.ToImmutable(); 446var typeDefinitions = TypeDefinitions!.ToImmutable(); 449var exportedTypes = ExportedTypes!.ToImmutable();
System\Reflection\Metadata\MetadataReader.cs (1)
1452nestedTypesMap.Add(group.Key, group.Value.ToImmutable());
System\Reflection\Metadata\TypeSystem\EventDefinition.cs (1)
94var otherAccessors = other?.ToImmutable() ?? ImmutableArray<MethodDefinitionHandle>.Empty;
System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs (1)
101var otherAccessors = other?.ToImmutable() ?? ImmutableArray<MethodDefinitionHandle>.Empty;
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (1)
109return builder.ToImmutable();