256 references to ToImmutable
Aspire.Hosting (9)
ApplicationModel\CustomResourceSnapshot.cs (1)
452return relationships.ToImmutable();
ApplicationModel\ResourceNotificationService.cs (1)
786return previousState with { Commands = builder.ToImmutable() };
Dcp\DcpNameGenerator.cs (1)
54AddInstancesAnnotation(resource, builder.ToImmutable());
Dcp\ResourceSnapshotBuilder.cs (5)
85return ports.ToImmutable(); 228return (launchArgsBuilder.ToImmutable(), argsAreSensitiveBuilder.ToImmutable(), anySensitive); 321return urls.ToImmutable(); 355return environment.ToImmutable();
Health\ResourceHealthCheckService.cs (1)
318return builder.ToImmutable();
dotnet (1)
Commands\Project\Convert\ProjectConvertCommand.cs (1)
453return explicitProjectItems.ToImmutable();
dotnet-format (6)
CodeFormatter.cs (1)
281return (projectFileCount + sourceGeneratedDocuments.Count, formattableDocuments.ToImmutable());
Formatters\DocumentFormatter.cs (2)
96return formattedDocuments.ToImmutable(); 183return fileChanges.ToImmutable();
Utilities\EditorConfigFinder.cs (1)
46return editorConfigPaths.ToImmutable();
Workspaces\FolderWorkspace_FolderSolutionLoader.cs (1)
85return filePaths.ToImmutable();
Workspaces\FolderWorkspace_ProjectLoader.cs (1)
41documents: LoadDocuments(projectId, projectFilePaths.ToImmutable()))
GenerateDocumentationAndConfigFiles (8)
CodeFixerExtensions.cs (1)
67return builder != null ? builder.ToImmutable() : ImmutableArray<CodeFixProvider>.Empty;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
571return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
112return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
46return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
356internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
55public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
42var result = builder.ToImmutable();
ILAssembler (14)
DocumentCompiler.cs (1)
61return (diagnostics.ToImmutable(), returnImage ? image.Image : null);
GrammarVisitor.cs (12)
143return (_diagnostics.ToImmutable(), null); 233exports: exports.ToImmutable(), 239return (_diagnostics.ToImmutable(), peBuilder); 273return (_diagnostics.ToImmutable(), standardBuilder); 310methodTokens.ToImmutable())); 313return builder.ToImmutable(); 783return new(builder.ToImmutable().SerializeSequence()); 823return new(builder.ToImmutable()); 2222return new((implementationEntity, typedefId, attrs.ToImmutable())); 2916return new(builder.ToImmutable()); 3500return new((implementation, offset, attributes.ToImmutable())); 4944return new(strings.ToImmutable().SerializeSequence());
VTableExportPEBuilder.cs (1)
149return builder.ToImmutable();
ILCompiler.Compiler (3)
Compiler\Dataflow\TrimAnalysisMethodCallPattern.cs (1)
75argumentsBuilder.ToImmutable(),
Compiler\ILScanner.cs (2)
1039_externalTypeMapNodes = externalTypeMapNodes.ToImmutable(); 1040_proxyTypeMapNodes = proxyTypeMapNodes.ToImmutable();
illink (1)
ILLink.CodeFixProvider (1)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
59return diagDescriptorsArrayBuilder.ToImmutable();
ILLink.RoslynAnalyzer (5)
DataFlow\ControlFlowGraphProxy.cs (1)
93finallyRegions.ToImmutable(),
DynamicallyAccessedMembersAnalyzer.cs (2)
34return builder.ToImmutable(); 77return diagDescriptorsArrayBuilder.ToImmutable();
RequiresAssemblyFilesAnalyzer.cs (1)
105return dangerousPatternsBuilder.ToImmutable();
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (1)
72argumentsBuilder.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.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\aspnetcore\src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableArrayBufferAdapter.cs (1)
18public static ImmutableArray<TElement> ToResult(ImmutableArray<TElement>.Builder buffer) => buffer.ToImmutable();
Microsoft.AspNetCore.OpenApi.SourceGenerators (4)
Helpers\ISymbolExtensions.cs (3)
39return result.ToImmutable(); 61return results.ToImmutable(); 84return results.ToImmutable();
src\aspnetcore\src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
33result.Add((entry.Key, index, entry.Value.ToImmutable()));
Microsoft.AspNetCore.Razor.Utilities.Shared (15)
ImmutableArrayExtensions.cs (13)
1284result = builder.ToImmutable(); 1307var array = builder.ToImmutable(); 1325var array = builder.ToImmutable(); 1343var array = builder.ToImmutable(); 1360var array = builder.ToImmutable(); 1378var array = builder.ToImmutable(); 1396var array = builder.ToImmutable(); 1415var array = builder.ToImmutable(); 1435var array = builder.ToImmutable(); 1455var array = builder.ToImmutable(); 1474var array = builder.ToImmutable(); 1494var array = builder.ToImmutable(); 1514var array = builder.ToImmutable();
PooledObjects\PooledArrayBuilder`1.cs (1)
651return builder.ToImmutable();
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
Microsoft.Build (6)
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (1)
117return new EditorConfigFile(globalSection!, namedSectionBuilder.ToImmutable());
Evaluation\LazyItemEvaluator.IncludeOperation.cs (2)
34_metadata = builder.Metadata.ToImmutable(); 151return itemsToAdd?.ToImmutable() ?? ImmutableArray<I>.Empty;
Evaluation\LazyItemEvaluator.UpdateOperation.cs (1)
27_metadata = builder.Metadata.ToImmutable();
Globbing\CompositeGlob.cs (1)
134return new CompositeGlob(builder.ToImmutable());
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\ArrayBuilder.cs (1)
80return _builder.ToImmutable();
Microsoft.Build.Tasks.Git (3)
GitDataReader\GitIgnore.cs (1)
147return new PatternGroup(parent, directory, patterns.ToImmutable());
GitDataReader\GitRepository.cs (2)
274return (builder.ToImmutable(), (lazyDiagnostics != null) ? lazyDiagnostics.ToImmutable() : ImmutableArray<string>.Empty);
Microsoft.CodeAnalysis (16)
AssemblyUtilities.cs (1)
51return builder.ToImmutable();
CommandLine\AnalyzerConfig.cs (1)
262return new AnalyzerConfig(globalSection!, namedSectionBuilder.ToImmutable(), pathToFile);
CommandLine\CommandLineArguments.cs (2)
569generators = generatorBuilder.ToImmutable(); 570analyzers = analyzerBuilder.ToImmutable();
DiagnosticAnalyzer\AnalysisResult.cs (1)
106return builder.ToImmutable();
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1236return builder.ToImmutable();
DiagnosticAnalyzer\AnalyzerFileReference.cs (2)
419return builder.ToImmutable(); 451return 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)
451return 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\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
Microsoft.CodeAnalysis.Analyzers (12)
ImmutableObjectMethodAnalyzer.cs (1)
63var immutableTypeSymbols = builder.ToImmutable();
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (1)
328builder.Add(category, infoList.ToImmutable());
MetaAnalyzers\ReportDiagnosticAnalyzer.cs (1)
195return builder.ToImmutable();
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
92return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
88return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
571return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
112return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
46return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
356internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
55public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
42var result = builder.ToImmutable();
Microsoft.CodeAnalysis.AnalyzerUtilities (10)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
92return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
88return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
571return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
112return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
46return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\ListExtensions.cs (1)
47return builder.Capacity == builder.Count ? builder.MoveToImmutable() : builder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
356internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
55public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
42var result = builder.ToImmutable();
Microsoft.CodeAnalysis.CodeStyle (4)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
356internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
55public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
42var result = builder.ToImmutable();
Microsoft.CodeAnalysis.CSharp (2)
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
894@params = builder.ToImmutable(); 980return ownedParams.ToImmutable();
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (1)
32public ImmutableArray<TextSpan> Spans => _spans?.ToImmutable() ?? [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
311internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
282internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
318return (deduplicatedUsingsBuilder.ToImmutable(), orphanedTrivia);
Microsoft.CodeAnalysis.CSharp.Features (5)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (1)
60public ImmutableArray<Diagnostic> Diagnostics => _diagnostics?.ToImmutable() ?? [];
SplitOrMergeIfStatements\CSharpIfLikeStatementGenerator.cs (1)
103return builder.ToImmutable();
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (1)
32public ImmutableArray<TextSpan> Spans => _spans?.ToImmutable() ?? [];
src\roslyn\src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
318return (deduplicatedUsingsBuilder.ToImmutable(), orphanedTrivia);
SyncedSource\FileBasedPrograms\FileLevelDirectiveHelpers.cs (1)
81return builder.ToImmutable();
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
311internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
282internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
Microsoft.CodeAnalysis.Extensions.Package (1)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
Microsoft.CodeAnalysis.Features (15)
ChangeSignature\AbstractChangeSignatureService.cs (1)
743return (newParameters.ToImmutable(), GetSeparators(list, numSeparatorsToSkip));
Completion\CommonCompletionItem.cs (1)
120return CompletionDescription.Create(builder.ToImmutable());
Copilot\CopilotUtilities.cs (1)
50return newSpans.ToImmutable();
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (1)
128this._analyzerInfoCache, builder.ToImmutable());
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (1)
314return state.Builder.ToImmutable();
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (1)
213s_descriptors = builder.ToImmutable();
QuickInfo\QuickInfoUtilities.cs (8)
50AddSection(QuickInfoSectionKinds.Description, builder.ToImmutable()); 65AddSection(QuickInfoSectionKinds.Description, builder.ToImmutable()); 88AddSection(QuickInfoSectionKinds.RemarksDocumentationComments, builder.ToImmutable()); 97AddSection(QuickInfoSectionKinds.ReturnsDocumentationComments, builder.ToImmutable()); 106AddSection(QuickInfoSectionKinds.ValueDocumentationComments, builder.ToImmutable()); 114AddSection(QuickInfoSectionKinds.TypeParameters, builder.ToImmutable()); 122AddSection(QuickInfoSectionKinds.AnonymousTypes, builder.ToImmutable()); 148AddSection(QuickInfoSectionKinds.InterceptedBy, builder.ToImmutable());
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
179var reference = new ReferenceInfo(referenceType, itemSpecification, treatAsUsed, compilationAssemblies.ToImmutable(), dependencies);
Microsoft.CodeAnalysis.Razor.Compiler (7)
CSharp\GenericTypeNameRewriter.cs (1)
40usedTypeArguments = builder.ToImmutable();
Language\CodeGeneration\DefaultCodeTargetBuilder.cs (1)
9=> new DefaultCodeTarget(CodeDocument, TargetExtensions.ToImmutable());
Language\ConfigureDirectivesFeature.cs (1)
40? directives.ToImmutable()
Language\DocumentClassifierPassBase.cs (1)
25? feature.TargetExtensions.ToImmutable()
Language\Intermediate\IntermediateNode.cs (1)
18=> _diagnostics ??= _diagnosticsBuilder?.ToImmutable() ?? [];
Language\TagHelperCollection.Builder.cs (1)
137var array = _items.ToImmutable();
Language\TypeNameObject.cs (1)
57s_knownTypeNames = knownTypeNames.ToImmutable();
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
349return builder.ToImmutable();
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
92return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
88return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
571return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
112return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
46return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
356internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
55public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
42var result = builder.ToImmutable();
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
478var modules = (moduleBuilder != null) ? moduleBuilder.ToImmutable() : ImmutableArray.Create(manifestModule);
Microsoft.CodeAnalysis.VisualBasic (3)
Compilation\VisualBasicCompilerDiagnosticAnalyzer.vb (1)
36Return builder.ToImmutable
Symbols\Metadata\PE\PEMethodSymbol.vb (2)
1082params = builder.ToImmutable() 1154Return ownedParams.ToImmutable()
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.vb (1)
56Return If(_diagnostics?.ToImmutable(), ImmutableArray(Of Diagnostic).Empty)
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
57Return typeItems.ToImmutable()
Microsoft.CodeAnalysis.Workspaces (11)
Diagnostics\HostDiagnosticAnalyzers.cs (1)
209builder.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();
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
95return arrayBuilder.ToImmutable();
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
356internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
55public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
42var result = builder.ToImmutable();
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
617documentFileNamesAdded = documentFileNamesAddedBuilder.ToImmutable();
Workspace\Solution\ProjectDependencyGraph_AddProject.cs (1)
30newDependencySets = builder.ToImmutable();
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
181results = builder.ToImmutable();
MSBuild\SolutionFileReader.cs (1)
77return builder.ToImmutable();
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Contracts\StackWalk\Context\X86\GCInfoDecoding\InfoHdr.cs (1)
366infoHdr.Epilogs = epilogsBuilder.ToImmutable();
Microsoft.DotNet.HotReload.Watch (1)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\StaticWebAssetsManifest.cs (1)
155return new StaticWebAssetsManifest(urlToPathMap.ToImmutable(), discoveryPatterns.ToImmutable());
Microsoft.DotNet.ProjectTools (3)
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\FileLevelDirectiveHelpers.cs (1)
80return builder.ToImmutable();
VirtualProjectBuilder.cs (2)
370evaluatedDirectiveBuilder.ToImmutable(), 388evaluatedDirectives = evaluatedDirectiveBuilder.ToImmutable();
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Roslyn4.0.cs (1)
130diagnostics?.ToImmutable() ?? ImmutableArray<Diagnostic>.Empty);
Microsoft.Interop.ComInterfaceGenerator (9)
ComClassInfo.cs (1)
47new(names.ToImmutable()));
ComInterfaceGenerator.cs (2)
455contextList.Add(new(iface, methodList.ToImmutable().ToSequenceEqual())); 457return contextList.ToImmutable();
ComInterfaceInfo.cs (1)
177return builder.ToImmutable();
ComMethodInfo.cs (1)
63return methods.ToImmutable().ToSequenceEqual();
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
67return projectsWithDiagnostics.ToImmutable();
VirtualMethodPointerStubGenerator.cs (3)
196return elements.ToImmutable(); 231return elements.ToImmutable(); 292return callingConventions.ToImmutable();
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSImportGenerator.cs (1)
235ImmutableArray<TypePositionInfo> finalElementInfo = typeInfoBuilder.ToImmutable();
Microsoft.Interop.LibraryImportGenerator (1)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
67return projectsWithDiagnostics.ToImmutable();
Microsoft.Interop.SourceGeneration (13)
BoundGenerators.cs (3)
123generatorBindingDiagnostics = generatorDiagnostics.ToImmutable(); 154NativeParameterMarshallers = nativeParamMarshallers.ToImmutable(), 155ManagedParameterMarshallers = managedParamMarshallers.ToImmutable(),
ContainingSyntaxContext.cs (1)
64return 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());
Roslyn.Diagnostics.Analyzers (9)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
81return _builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
92return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
88return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
571return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
112return builder.ToImmutable();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
46return originalDefinitionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (1)
356internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
55public static ImmutableArray<IOption2> EditorConfigOptions => s_allOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ImmutableArrayExtensions.cs (1)
42var result = builder.ToImmutable();
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
311internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (1)
282internal static readonly ImmutableArray<IOption2> EditorConfigOptions = s_editorConfigOptionsBuilder.ToImmutable();
rzc (1)
Json\JsonDataReader.cs (1)
187return builder.ToImmutable();
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableArray.cs (1)
445return builder.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)
1471nestedTypesMap.Add(group.Key, group.Value.ToImmutable());
System\Reflection\Metadata\TypeSystem\EventDefinition.cs (1)
98var otherAccessors = other?.ToImmutable() ?? ImmutableArray<MethodDefinitionHandle>.Empty;
System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs (1)
105var otherAccessors = other?.ToImmutable() ?? ImmutableArray<MethodDefinitionHandle>.Empty;
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (1)
109return builder.ToImmutable();
System.Text.RegularExpressions.Generator (2)
RegexGenerator.cs (2)
152Results: filteredResults?.ToImmutable() ?? ImmutableArray<object>.Empty, 153Diagnostics: diagnostics?.ToImmutable() ?? ImmutableArray<Diagnostic>.Empty);