46 references to SpecializedCollections
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
351var attributeValues = SpecializedCollections.EmptyEnumerable<string?>();
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (2)
152var prefixParts = SpecializedCollections.SingletonEnumerable(new SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, null, "(")).ToTaggedText(); 153var suffixParts = SpecializedCollections.SingletonEnumerable(new SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, null, ")")).ToTaggedText();
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (4)
257validTypeDeclarations ??= SpecializedCollections.EmptySet<SyntaxKind>(); 294validModifiers ??= SpecializedCollections.EmptySet<SyntaxKind>(); 543validTypeDeclarations ??= SpecializedCollections.EmptySet<SyntaxKind>(); 591validModifiers ??= SpecializedCollections.EmptySet<SyntaxKind>();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SemanticModelExtensions.cs (2)
59reservedNames ??= SpecializedCollections.EmptyList<string>(); 82reservedNames ??= SpecializedCollections.EmptyList<string>();
Microsoft.CodeAnalysis.Features (16)
EditAndContinue\DeclarationBodyMap.cs (2)
15SpecializedCollections.EmptyReadOnlyDictionary<SyntaxNode, SyntaxNode>(), 16SpecializedCollections.EmptyReadOnlyDictionary<SyntaxNode, SyntaxNode>(),
EditAndContinue\Utilities\BidirectionalMap.cs (2)
17public static readonly BidirectionalMap<T> Empty = new(SpecializedCollections.EmptyReadOnlyDictionary<T, T>(), SpecializedCollections.EmptyReadOnlyDictionary<T, T>());
ExtractInterface\ExtractInterfaceCodeAction.cs (1)
48var operations = SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
ExtractMethod\AbstractSyntaxTriviaService.cs (1)
75var emptyList = SpecializedCollections.EmptyEnumerable<SyntaxTrivia>();
GenerateType\AbstractGenerateTypeService.CodeAction.cs (1)
174var operations = SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (2)
71SpecializedCollections.EmptyDictionary<INamedTypeSymbol, string>(), 72SpecializedCollections.EmptyList<SymbolDisplayPart>());
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (1)
34return SpecializedCollections.EmptyDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>();
Navigation\NavigableItemFactory.cs (2)
48var generatedSourceLocations = candidateLocationGroups.SingleOrDefault(g => g.Key) ?? SpecializedCollections.EmptyEnumerable<Location>(); 49var nonGeneratedSourceLocations = candidateLocationGroups.SingleOrDefault(g => !g.Key) ?? SpecializedCollections.EmptyEnumerable<Location>();
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
403: SpecializedCollections.SingletonEnumerable(argument);
SignatureHelp\AbstractSignatureHelpProvider.cs (1)
179? SpecializedCollections.EmptyList<SymbolDisplayPart>()
src\roslyn\src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
52var spans = SpecializedCollections.SingletonEnumerable(span);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
173reservedNames ??= SpecializedCollections.EmptyList<string>();
Microsoft.CodeAnalysis.Workspaces (21)
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
430return SpecializedCollections.EmptySet<ProjectId>();
Formatting\Formatter.cs (1)
307? SpecializedCollections.EmptyList<TextChange>()
Recommendations\AbstractRecommendationService.cs (1)
53return SpecializedCollections.EmptySet<INamedTypeSymbol>();
src\roslyn\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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (4)
79return SpecializedCollections.EmptyBoxedImmutableArray<T>(); 84return array.IsDefaultOrEmpty ? SpecializedCollections.EmptyBoxedImmutableArray<T>() : (IReadOnlyList<T>)items; 89return SpecializedCollections.EmptyBoxedImmutableArray<T>(); 328return SpecializedCollections.EmptyEnumerable<T>();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.cs (2)
38var operations = SpecializedCollections.SingletonEnumerable(rootOperation); 52var operations = SpecializedCollections.SingletonEnumerable(localFunctionOperation);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
155var operations = SpecializedCollections.SingletonEnumerable(basicBlock.BranchValue);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
28case T s: return SpecializedCollections.SingletonEnumerable(s);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
101public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 103public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 104public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
26var info = new CodeGenerationNamespaceInfo(imports ?? SpecializedCollections.EmptyList<ISymbol>());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceSymbol.cs (1)
16private readonly IList<INamespaceOrTypeSymbol> _members = members ?? SpecializedCollections.EmptyList<INamespaceOrTypeSymbol>();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
191ignoreErrorCode ??= SpecializedCollections.EmptyList<string>();
Workspace\Solution\ProjectInfo.cs (1)
256analyzerConfigDocuments: SpecializedCollections.EmptyBoxedImmutableArray<DocumentInfo>(),
Workspace\Solution\SolutionState.cs (1)
126projectIds: SpecializedCollections.EmptyBoxedImmutableArray<ProjectId>(),