22 references to SpecializedCollections
Microsoft.CodeAnalysis.Workspaces (22)
Diagnostics\DiagnosticAnalysisResult.cs (1)
304
var documents =
SpecializedCollections
.EmptyEnumerable<DocumentId>();
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
429
return
SpecializedCollections
.EmptySet<ProjectId>();
Formatting\Formatter.cs (1)
308
?
SpecializedCollections
.EmptyList<TextChange>()
Recommendations\AbstractRecommendationService.cs (1)
56
return
SpecializedCollections
.EmptySet<INamedTypeSymbol>();
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (4)
85
return
SpecializedCollections
.EmptyBoxedImmutableArray<T>();
90
return array.IsDefaultOrEmpty ?
SpecializedCollections
.EmptyBoxedImmutableArray<T>() : (IReadOnlyList<T>)items;
95
return
SpecializedCollections
.EmptyBoxedImmutableArray<T>();
345
return
SpecializedCollections
.EmptyEnumerable<T>();
src\Compilers\Core\Portable\InternalUtilities\SetWithInsertionOrder.cs (2)
90
=> _elements is null ?
SpecializedCollections
.EmptyEnumerator<T>() : ((IEnumerable<T>)_elements).GetEnumerator();
99
=> (IReadOnlySet<T>?)_set ??
SpecializedCollections
.EmptyReadOnlySet<T>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.cs (2)
37
var operations =
SpecializedCollections
.SingletonEnumerable(rootOperation);
51
var operations =
SpecializedCollections
.SingletonEnumerable(localFunctionOperation);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
155
var operations =
SpecializedCollections
.SingletonEnumerable(basicBlock.BranchValue);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
27
case T s: return
SpecializedCollections
.SingletonEnumerable(s);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
187
public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(
SpecializedCollections
.EmptyEnumerable<T>());
189
public static readonly Task<IList<T>> EmptyList = Task.FromResult(
SpecializedCollections
.EmptyList<T>());
190
public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(
SpecializedCollections
.EmptyReadOnlyList<T>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
26
var info = new CodeGenerationNamespaceInfo(imports ??
SpecializedCollections
.EmptyList<ISymbol>());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceSymbol.cs (1)
16
private readonly IList<INamespaceOrTypeSymbol> _members = members ??
SpecializedCollections
.EmptyList<INamespaceOrTypeSymbol>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
182
ignoreErrorCode ??=
SpecializedCollections
.EmptyList<string>();
Workspace\Solution\ProjectInfo.cs (1)
255
analyzerConfigDocuments:
SpecializedCollections
.EmptyBoxedImmutableArray<DocumentInfo>(),
Workspace\Solution\SolutionState.cs (1)
114
projectIds:
SpecializedCollections
.EmptyBoxedImmutableArray<ProjectId>(),