43 references to ToImmutableArrayOrEmpty
Microsoft.CodeAnalysis.CSharp.Features (3)
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (2)
78
var accessibleMethods = methodGroup.Where(m => m.IsAccessibleWithin(within, throughType: throughType)).
ToImmutableArrayOrEmpty
();
85
return accessibleMethods.Where(m => !IsHiddenByOtherMethod(m, methodSet)).
ToImmutableArrayOrEmpty
();
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
78
.
ToImmutableArrayOrEmpty
();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Serialization\CSharpOptionsSerializationService.cs (1)
42
writer.WriteArray(options.PreprocessorSymbolNames.
ToImmutableArrayOrEmpty
(), static (w, p) => w.WriteString(p));
Microsoft.CodeAnalysis.Features (26)
AddImport\CodeActions\AddImportCodeAction.cs (2)
48
Tags = fixData.Tags.
ToImmutableArrayOrEmpty
().AddRange(additionalTags);
50
_textChanges = fixData.TextChanges.
ToImmutableArrayOrEmpty
();
Completion\CompletionList.cs (1)
83
_lazyItems = new(() => ItemsList.
ToImmutableArrayOrEmpty
(), System.Threading.LazyThreadSafetyMode.PublicationOnly);
Completion\CompletionService_GetCompletions.cs (1)
148
var triggeredProviders = providers.Where(p => p.ShouldTriggerCompletion(document.Project.Services, text, caretPosition, trigger, options, passThroughOptions)).
ToImmutableArrayOrEmpty
();
Debugging\AbstractBreakpointResolver.cs (1)
114
Select(CreateBreakpoint).
ToImmutableArrayOrEmpty
();
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
114
diagnostics = CompilationWithAnalyzers.GetEffectiveDiagnostics(diagnostics, compilation).
ToImmutableArrayOrEmpty
();
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AnonymousTypes.cs (1)
31
firstSymbol, directStructuralTypes.
ToImmutableArrayOrEmpty
(), _semanticModel, _position);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (2)
94
.
ToImmutableArrayOrEmpty
();
392
.
ToImmutableArrayOrEmpty
();
Organizing\AbstractOrganizingService.cs (1)
21
=> _organizers = organizers.
ToImmutableArrayOrEmpty
();
SignatureHelp\AbstractSignatureHelpProvider.cs (1)
334
item.DescriptionParts = updatedDescription.
ToImmutableArrayOrEmpty
();
SignatureHelp\SignatureHelpItem.cs (5)
56
PrefixDisplayParts = prefixParts.
ToImmutableArrayOrEmpty
();
57
SeparatorDisplayParts = separatorParts.
ToImmutableArrayOrEmpty
();
58
SuffixDisplayParts = suffixParts.
ToImmutableArrayOrEmpty
();
59
Parameters = parameters.
ToImmutableArrayOrEmpty
();
60
DescriptionParts = descriptionParts.
ToImmutableArrayOrEmpty
();
SignatureHelp\SignatureHelpParameter.cs (8)
43
public IList<SymbolDisplayPart> PrefixDisplayParts { get; } = prefixDisplayParts.
ToImmutableArrayOrEmpty
();
48
public IList<SymbolDisplayPart> SuffixDisplayParts { get; } = suffixDisplayParts.
ToImmutableArrayOrEmpty
();
54
public IList<SymbolDisplayPart> DisplayParts { get; } = displayParts.
ToImmutableArrayOrEmpty
();
66
public IList<SymbolDisplayPart> SelectedDisplayParts { get; } = selectedDisplayParts.
ToImmutableArrayOrEmpty
();
111
public IList<TaggedText> PrefixDisplayParts { get; } = prefixDisplayParts.
ToImmutableArrayOrEmpty
();
116
public IList<TaggedText> SuffixDisplayParts { get; } = suffixDisplayParts.
ToImmutableArrayOrEmpty
();
122
public IList<TaggedText> DisplayParts { get; } = displayParts.
ToImmutableArrayOrEmpty
();
134
public IList<TaggedText> SelectedDisplayParts { get; } = selectedDisplayParts.
ToImmutableArrayOrEmpty
();
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
178
.
ToImmutableArrayOrEmpty
<CodeAction>();
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
140
if (operationBlock.Syntax.GetDiagnostics().
ToImmutableArrayOrEmpty
().HasAnyErrors())
Microsoft.CodeAnalysis.Workspaces (13)
CodeActions\CodeAction.cs (1)
306
return operations.
ToImmutableArrayOrEmpty
();
CodeActions\CodeActionWithOptions.cs (1)
58
return operations.
ToImmutableArrayOrEmpty
();
CodeFixesAndRefactorings\FixAllProviderInfo.cs (4)
55
var diagnosticIds = fixAllProvider.GetSupportedFixAllDiagnosticIds(provider).
ToImmutableArrayOrEmpty
();
59
var scopes = fixAllProvider.GetSupportedFixAllScopes().
ToImmutableArrayOrEmpty
();
75
var scopes = refactorAllProvider.GetSupportedRefactorAllScopes().
ToImmutableArrayOrEmpty
();
91
var scopes = fixAllProvider.GetSupportedFixAllScopes().
ToImmutableArrayOrEmpty
();
Serialization\SerializerService_Asset.cs (1)
82
return new ProjectReference(projectId, aliases.
ToImmutableArrayOrEmpty
(), embedInteropTypes);
Shared\Utilities\EditorBrowsableHelpers.cs (1)
115
return candidateConstructors.
ToImmutableArrayOrEmpty
();
Simplification\Simplifier.cs (2)
237
document, spans.
ToImmutableArrayOrEmpty
(), options, reducers: default, cancellationToken).ConfigureAwait(false);
242
document, spans.
ToImmutableArrayOrEmpty
(), options, reducers: default, cancellationToken);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\SetWithInsertionOrder.cs (1)
94
public ImmutableArray<T> AsImmutable() => _elements.
ToImmutableArrayOrEmpty
();
Workspace\Solution\DocumentInfo.cs (1)
237
writer.WriteArray(Folders.
ToImmutableArrayOrEmpty
(), static (w, f) => w.WriteString(f));
Workspace\Solution\ProjectDependencyGraph.cs (1)
468
results.Add(sortedProjects.Object.
ToImmutableArrayOrEmpty
());