205 references to SpecializedCollections
Microsoft.CodeAnalysis.CodeStyle (33)
AbstractSyntaxFormatting.cs (4)
45? SpecializedCollections.EmptyReadOnlyList<TextSpan>() 46: SpecializedCollections.SingletonReadOnlyList(node.FullSpan); 55return CreateAggregatedFormattingResult(node, SpecializedCollections.EmptyList<AbstractFormattingResult>()); 75return CreateAggregatedFormattingResult(node, SpecializedCollections.EmptyList<AbstractFormattingResult>());
AbstractTriviaDataFactory.FormattedWhitespace.cs (1)
54=> SpecializedCollections.SingletonEnumerable<TextChange>(new TextChange(textSpan, _newString));
BKTree.cs (1)
75return SpecializedCollections.EmptyList<string>();
EnumerableExtensions.cs (4)
75return SpecializedCollections.EmptyBoxedImmutableArray<T>(); 80return array.IsDefaultOrEmpty ? SpecializedCollections.EmptyBoxedImmutableArray<T>() : (IReadOnlyList<T>)items; 85return SpecializedCollections.EmptyBoxedImmutableArray<T>(); 292return SpecializedCollections.EmptyEnumerable<T>();
FormatterHelper.cs (3)
33=> Format(node, SpecializedCollections.SingletonEnumerable(node.FullSpan), syntaxFormattingService, options, rules: null, cancellationToken: cancellationToken); 36=> Format(node, SpecializedCollections.SingletonEnumerable(spanToFormat), syntaxFormattingService, options, rules: null, cancellationToken: cancellationToken); 66=> GetFormattedTextChanges(node, SpecializedCollections.SingletonEnumerable(node.FullSpan), syntaxFormattingService, options, rules: null, cancellationToken: cancellationToken);
FormattingExtensions.cs (1)
37=> SpecializedCollections.SingletonEnumerable(rule).Concat(rules);
ImmutableHashMap.cs (1)
687=> SpecializedCollections.SingletonEnumerable(this);
INamedTypeSymbolExtensions.cs (1)
398? SpecializedCollections.EmptyEnumerable<INamedTypeSymbol>()
INamespaceOrTypeSymbolExtensions.cs (1)
27? SpecializedCollections.EmptyEnumerable<IPropertySymbol>()
IReadOnlyDictionaryExtensions.cs (2)
27case T s: return SpecializedCollections.SingletonEnumerable(s); 28default: return SpecializedCollections.EmptyEnumerable<T>();
ISyntaxFactsExtensions.cs (1)
386=> service.SpansPreprocessorDirective(SpecializedCollections.SingletonEnumerable(node));
ITypeSymbolExtensions.cs (1)
436return SpecializedCollections.EmptyEnumerable<T>();
PopulateSwitchExpressionHelpers.cs (1)
38return SpecializedCollections.EmptyCollection<ISymbol>();
PopulateSwitchStatementHelpers.cs (1)
62return SpecializedCollections.EmptyCollection<ISymbol>();
SetWithInsertionOrder.cs (1)
89=> _elements is null ? SpecializedCollections.EmptyEnumerator<T>() : ((IEnumerable<T>)_elements).GetEnumerator();
SpecializedTasks.cs (3)
188public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 190public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 191public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
StructuredAnalyzerConfigOptions.cs (1)
56=> SpecializedCollections.EmptyEnumerable<string>();
SymbolUsageAnalysis.cs (2)
37var operations = SpecializedCollections.SingletonEnumerable(rootOperation); 51var operations = SpecializedCollections.SingletonEnumerable(localFunctionOperation);
SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
155var operations = SpecializedCollections.SingletonEnumerable(basicBlock.BranchValue);
SyntaxTokenExtensions.cs (2)
29: SpecializedCollections.EmptyEnumerable<T>(); 36: SpecializedCollections.EmptyEnumerable<SyntaxNode>();
Microsoft.CodeAnalysis.CodeStyle.Fixes (18)
AbstractTypeInferenceService.AbstractTypeInferrer.cs (5)
73return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 88? SpecializedCollections.EmptyCollection<TypeInferenceInfo>() 89: SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo(type)); 116return SpecializedCollections.SingletonCollection(new TypeInferenceInfo(elementType)); 120return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>();
CodeGenerationContext.cs (1)
160AdditionalImports = additionalImports ?? SpecializedCollections.EmptyEnumerable<INamespaceSymbol>();
CodeGenerationHelpers.cs (1)
35SpecializedCollections.EmptyList<SyntaxNode>());
CodeGenerationNamespaceInfo.cs (2)
27var info = new CodeGenerationNamespaceInfo(imports ?? SpecializedCollections.EmptyList<ISymbol>()); 43? SpecializedCollections.EmptyList<ISymbol>()
CodeGenerationNamespaceSymbol.cs (1)
21_members = members ?? SpecializedCollections.EmptyList<INamespaceOrTypeSymbol>();
DocumentExtensions.cs (1)
163ignoreErrorCode ??= SpecializedCollections.EmptyList<string>();
IAddImportsService.cs (1)
50SpecializedCollections.SingletonEnumerable(newImport), generator, options, cancellationToken);
NamingStyleCodeFixProvider.cs (2)
155return SpecializedCollections.SingletonEnumerable( 164return SpecializedCollections.SingletonEnumerable(codeAction);
OrderableMetadata.cs (2)
34this.AfterTyped = after ?? SpecializedCollections.EmptyEnumerable<string>(); 35this.BeforeTyped = before ?? SpecializedCollections.EmptyEnumerable<string>();
ParsedDocument.cs (1)
77return SpecializedCollections.EmptyEnumerable<TextChange>();
SyntaxGeneratorExtensions.cs (1)
38SpecializedCollections.EmptyList<SyntaxNode>());
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
CSharpSemanticFacts.cs (1)
257return SpecializedCollections.SingletonEnumerable(
CSharpSmartTokenFormatter.cs (1)
87return SpecializedCollections.EmptyList<TextChange>();
CSharpSyntaxFacts.cs (1)
1060return SpecializedCollections.EmptyEnumerable<SyntaxNode>();
SemanticModelExtensions.cs (1)
36return SpecializedCollections.EmptyEnumerable<ITypeSymbol>();
SyntaxNodeExtensions.cs (1)
966return SpecializedCollections.EmptyEnumerable<MemberDeclarationSyntax>();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (90)
CSharpTypeInferenceService.TypeInferrer.cs (84)
90return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 118return SpecializedCollections.SingletonEnumerable(typeInferenceInfo); 123return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 188_ => SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(), 255_ => SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(), 266return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 277return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 337return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 353return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 375return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 388return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 444return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 508return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 532return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 540return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 549return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 811return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 839return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 850return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 873return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 886return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 897return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 907return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1080return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1087return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1093return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1104return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1115return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1201: SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1216return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1226return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1240return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1257return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1268return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1273return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1299return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1304return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1315return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1469return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1518return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1537return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1553return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1570_ => SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>() 1603return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1617return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1628return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1639return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1658return SpecializedCollections.SingletonEnumerable( 1663return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1673return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1684return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1692return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1699_ => SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>() 1708return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1714_ => SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>() 1732return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1815return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1893return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1903return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1921return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1929return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1939return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 1976return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2011return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2027return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2038? SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo(namedType.TypeArguments[0])) 2039: SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2070return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2092? SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo(UnwrapTaskLike(type, isAsync))) 2093: SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2142return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2150return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2161return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2175return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2197return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2208return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2219return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2229return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2233return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2312return SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo( 2335return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2431return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>(); 2434return SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean))); 2442return SpecializedCollections.EmptyEnumerable<TypeInferenceInfo>();
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
160.Concat(SpecializedCollections.SingletonEnumerable((
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (4)
256validTypeDeclarations ??= SpecializedCollections.EmptySet<SyntaxKind>(); 293validModifiers ??= SpecializedCollections.EmptySet<SyntaxKind>(); 542validTypeDeclarations ??= SpecializedCollections.EmptySet<SyntaxKind>(); 590validModifiers ??= SpecializedCollections.EmptySet<SyntaxKind>();
TypeDeclarationSyntaxExtensions.cs (1)
73var baseListTypes = SpecializedCollections.EmptyEnumerable<BaseTypeSyntax>();
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (12)
DirectiveSyntaxExtensions.vb (1)
127Return SpecializedCollections.EmptyReadOnlyList(Of DirectiveTriviaSyntax)()
ElasticTriviaFormattingRule.vb (2)
70SpecializedCollections.SingletonEnumerable(initializer.CloseBraceToken), 81SpecializedCollections.SingletonEnumerable(collectionInitializer.Initializer.CloseBraceToken),
SemanticModelExtensions.vb (2)
26Return SpecializedCollections.EmptyList(Of ITypeSymbol)() 38Return SpecializedCollections.EmptyList(Of ISymbol)()
SyntaxNodeExtensions.vb (2)
977Return SpecializedCollections.SingletonEnumerable(initializer.Value) 980Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)()
TriviaDataFactory.AbstractLineBreakTrivia.vb (1)
49Return SpecializedCollections.SingletonEnumerable(New TextChange(textSpan, Me._newString))
VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb (1)
57Return SpecializedCollections.SingletonEnumerable(tree.GetCompilationUnitRoot().Imports.GetContainedSpan())
VisualBasicSemanticFacts.vb (1)
230Return SpecializedCollections.SingletonEnumerable(semanticModel.GetDeclaredSymbol(memberDeclaration, cancellationToken))
VisualBasicSmartTokenFormatter.vb (1)
40Dim spans = SpecializedCollections.SingletonEnumerable(TextSpan.FromBounds(previousToken.SpanStart, token.Span.End))
VisualBasicSyntaxFacts.vb (1)
1105Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)()
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (47)
SpecialFormattingOperation.vb (1)
217SpecializedCollections.SingletonEnumerable(baseToken.GetNextToken(includeZeroWidth:=True)),
VisualBasicTypeInferenceService.TypeInferrer.vb (46)
48Return If(objectAsDefault, CreateResult(Me.Compilation.ObjectType), SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)()) 100Function(x) SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)()) 106Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 111Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 123Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 174Function(x) SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)()) 180SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)()) 196Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo) 210Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 229Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 247Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 307Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 331Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 364Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 380Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 402Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 434Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 443Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 463Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 479Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 497Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 577Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 583Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 591Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 630Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 636Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 644Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 669Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 686Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 703Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 714Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 720Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 733Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo) 748SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)) 754Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 760Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo) 764Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo) 780Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo) 813Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 832Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 853Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 862Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 888Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo) 955Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 1018Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)() 1073Return SpecializedCollections.EmptyEnumerable(Of TypeInferenceInfo)