717 references to SpecializedCollections
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (1)
AbstractUserDiagnosticTest.cs (1)
205var diagnosticsToFix = ImmutableDictionary.CreateRange(SpecializedCollections.SingletonEnumerable(KeyValuePairUtil.Create(document, diagnostics.ToImmutableArray())));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (7)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (3)
107return SpecializedCollections.EmptyList<TextChange>(); 113SpecializedCollections.SingletonCollection(CommonFormattingHelpers.GetFormattingSpan(root, span.Value)), 295return SpecializedCollections.EmptyEnumerable<SyntaxNode>();
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (2)
393nodes: SpecializedCollections.SingletonCollection(baseObjectCreationExpressionNode), 395tokens: SpecializedCollections.SingletonCollection(nextToken),
DecompiledSource\CSharpDecompiledSourceService.cs (1)
74SpecializedCollections.SingletonEnumerable(node.FullSpan),
Formatting\CSharpFormattingInteractionService.cs (1)
100return Task.FromResult(Formatter.GetFormattedTextChanges(parsedDocument.Root, SpecializedCollections.SingletonEnumerable(formattingSpan), document.Project.Solution.Services, options, cancellationToken).ToImmutableArray());
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Diagnostics\Suppression\SuppressionTests.cs (3)
459SpecializedCollections.EmptyEnumerable<Lazy<IErrorLoggerService>>(), 460SpecializedCollections.EmptyEnumerable<Lazy<CodeFixProvider, CodeChangeProviderMetadata>>(), 461SpecializedCollections.SingletonEnumerable(suppressionProviderFactory));
ExtractClass\ExtractClassTests.cs (1)
47return SpecializedCollections.SingletonEnumerable(new CSharpExtractClassCodeRefactoringProvider(service));
Microsoft.CodeAnalysis.CSharp.Features (53)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (2)
120var newClosingToken = closingToken.WithPrependedLeadingTrivia(SpecializedCollections.SingletonEnumerable(annotatedNewline)); 248annotatedRoot, SpecializedCollections.SingletonEnumerable(spanToFormat), document.SolutionServices, options.FormattingOptions, rules, cancellationToken);
BraceCompletion\BracketBraceCompletionService.cs (1)
77SpecializedCollections.SingletonEnumerable(bracketPair.closeBracket), AlignTokensOption.AlignIndentationOfTokensToFirstTokenOfBaseTokenLine);
BraceCompletion\CurlyBraceCompletionService.cs (1)
261SpecializedCollections.SingletonEnumerable(bracePair.closeBrace), AlignTokensOption.AlignIndentationOfTokensToFirstTokenOfBaseTokenLine);
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (1)
231return SpecializedCollections.EmptyEnumerable<ImmutableArray<IParameterSymbol>>();
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
270return SpecializedCollections.SingletonEnumerable(delegateType.DelegateInvokeMethod!.Parameters);
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (2)
161return SpecializedCollections.EmptyEnumerable<CompletionItem>(); 332var attributeValues = SpecializedCollections.EmptyEnumerable<string?>();
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
149SpecializedCollections.SingletonEnumerable(variableStatement));
CSharpDeclarationComputer.cs (6)
154var codeBlocks = SpecializedCollections.SingletonEnumerable(t.EqualsValue).Concat(attributes); 191var codeBlocks = SpecializedCollections.SingletonEnumerable(decl.Initializer).Concat(attributes); 226var codeBlocks = SpecializedCollections.SingletonEnumerable(t.Initializer).Concat(attributes); 348SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 351SpecializedCollections.SingletonEnumerable(parameter.Default).Concat(GetAttributes(parameter.AttributeLists)); 356SpecializedCollections.EmptyEnumerable<SyntaxNode>();
Debugging\BreakpointResolver.cs (1)
100nameParts = SpecializedCollections.EmptyList<NameAndArity>();
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
559=> SpecializedCollections.SingletonEnumerable(lambdaBody);
EditAndContinue\SyntaxComparer.cs (1)
997parameters = SpecializedCollections.EmptyEnumerable<SyntaxToken>();
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
76var modifiers = SpecializedCollections.SingletonEnumerable(SyntaxFactory.Token(SyntaxKind.PrivateKeyword))
ExtractMethod\CSharpMethodExtractor.cs (2)
219methodDefinition = methodDefinition.WithPrependedLeadingTrivia(SpecializedCollections.SingletonEnumerable(SyntaxFactory.EndOfLine(newLine))); 224methodDefinition = methodDefinition.WithPrependedLeadingTrivia(SpecializedCollections.SingletonEnumerable(SyntaxFactory.EndOfLine(newLine)));
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (5)
301return SpecializedCollections.SingletonEnumerable<StatementSyntax>(SyntaxFactory.CheckedStatement(kind, SyntaxFactory.Block(statements))); 306return SpecializedCollections.SingletonEnumerable<StatementSyntax>(SyntaxFactory.CheckedStatement(kind, block)); 309return SpecializedCollections.SingletonEnumerable<StatementSyntax>(SyntaxFactory.CheckedStatement(kind, SyntaxFactory.Block(statements))); 719SpecializedCollections.SingletonEnumerable(SyntaxFactory.ElasticCarriageReturnLineFeed))); 726SpecializedCollections.SingletonEnumerable(SyntaxFactory.ElasticCarriageReturnLineFeed)));
ExtractMethod\CSharpMethodExtractor.TriviaResult.cs (8)
106? SpecializedCollections.SingletonEnumerable(SyntaxFactory.ElasticMarker) 107: SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(); 116? SpecializedCollections.SingletonEnumerable(SyntaxFactory.ElasticMarker) 117: SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(); 124var trailingTrivia = previousTriviaPair.TrailingTrivia ?? SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(); 125var leadingTrivia = nextTriviaPair.LeadingTrivia ?? SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(); 169return SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(); 180return SpecializedCollections.EmptyEnumerable<SyntaxTrivia>();
ExtractMethod\CSharpSelectionValidator.cs (1)
429return SpecializedCollections.EmptyEnumerable<SyntaxNode>();
ImplementInterface\CSharpImplementInterfaceService.cs (1)
62interfaceTypes = SpecializedCollections.SingletonEnumerable(interfaceType);
NavigationBar\CSharpNavigationBarItemService.cs (1)
135return SpecializedCollections.EmptyEnumerable<INamedTypeSymbol>();
Organizing\Organizers\ModifiersOrganizer.cs (1)
23initialList[0] = initialList[0].WithLeadingTrivia(SpecializedCollections.EmptyEnumerable<SyntaxTrivia>());
SignatureHelp\AbstractCSharpSignatureHelpProvider.cs (1)
80=> SpecializedCollections.EmptyList<TaggedText>();
SignatureHelp\AbstractOrdinaryMethodSignatureHelpProvider.cs (1)
89=> SpecializedCollections.SingletonList(Punctuation(SyntaxKind.CloseParenToken));
SignatureHelp\AttributeSignatureHelpProvider.cs (1)
229return SpecializedCollections.SingletonList(
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (1)
176return SpecializedCollections.SingletonList(
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (1)
280return SpecializedCollections.SingletonList(
SignatureHelp\GenericNameSignatureHelpProvider_NamedType.cs (1)
27return SpecializedCollections.SingletonList(
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (2)
56return SpecializedCollections.SingletonList(item); 100return SpecializedCollections.SingletonList(
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider_DelegateType.cs (2)
73return SpecializedCollections.SingletonList( 83return SpecializedCollections.SingletonList(
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider_NormalType.cs (1)
55return SpecializedCollections.SingletonList(
SignatureHelp\PrimaryConstructorBaseTypeSignatureHelpProvider.cs (1)
154return SpecializedCollections.SingletonList(Punctuation(SyntaxKind.CloseParenToken));
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (2)
153var prefixParts = SpecializedCollections.SingletonEnumerable(new SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, null, "(")).ToTaggedText(); 154var suffixParts = SpecializedCollections.SingletonEnumerable(new SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, null, ")")).ToTaggedText();
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
104SpecializedCollections.EmptyCollection<Location>(),
Microsoft.CodeAnalysis.CSharp.Workspaces (114)
CodeGeneration\CSharpSyntaxGenerator.cs (12)
460getAccessorStatements = SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 465setAccessorStatements = SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 543addAccessorStatements ??= SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 544removeAccessorStatements ??= SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 1121return SpecializedCollections.EmptyReadOnlyList<SyntaxNode>(); 1221_ => SpecializedCollections.EmptyReadOnlyList<SyntaxNode>(), 1250_ => SpecializedCollections.EmptyReadOnlyList<SyntaxNode>(), 2136: SpecializedCollections.EmptyReadOnlyList<SyntaxNode>(); 2155return statement?.Sections ?? SpecializedCollections.EmptyReadOnlyList<SyntaxNode>(); 2463private static readonly IReadOnlyList<SyntaxNode> s_EmptyList = SpecializedCollections.EmptyReadOnlyList<SyntaxNode>(); 2681return SpecializedCollections.EmptyReadOnlyList<SyntaxNode>(); 2978_ => SpecializedCollections.EmptyReadOnlyList<SyntaxNode>(),
CSharpSemanticFacts.cs (1)
257return SpecializedCollections.SingletonEnumerable(
CSharpSmartTokenFormatter.cs (1)
87return SpecializedCollections.EmptyList<TextChange>();
CSharpSyntaxFacts.cs (1)
1060return SpecializedCollections.EmptyEnumerable<SyntaxNode>();
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>();
Extensions\SemanticModelExtensions.cs (2)
61reservedNames ??= SpecializedCollections.EmptyList<string>(); 84reservedNames ??= SpecializedCollections.EmptyList<string>();
Formatting\CSharpSyntaxFormattingService.cs (3)
282return SpecializedCollections.EmptyEnumerable<AbstractFormattingRule>(); 285return SpecializedCollections.SingletonEnumerable(TypingFormattingRule.Instance); 333var result = service.GetFormattingResult(document.Root, SpecializedCollections.SingletonEnumerable(formattingSpan), options, rules, cancellationToken);
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
160.Concat(SpecializedCollections.SingletonEnumerable((
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (1)
966return SpecializedCollections.EmptyEnumerable<MemberDeclarationSyntax>();
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>();
Rename\CSharpRenameRewriterLanguageService.cs (2)
481symbols = SpecializedCollections.SingletonEnumerable(symbolInfo.Symbol); 813AddSymbolSourceSpans(conflicts, SpecializedCollections.SingletonEnumerable(containingNamedType), reverseMappedLocations);
SemanticModelExtensions.cs (1)
36return SpecializedCollections.EmptyEnumerable<ITypeSymbol>();
TypeDeclarationSyntaxExtensions.cs (1)
73var baseListTypes = SpecializedCollections.EmptyEnumerable<BaseTypeSyntax>();
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (3)
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (1)
31return SpecializedCollections.SingletonEnumerable(literal.Token);
Formatting\CSharpFormattingTestBase.cs (2)
33return AssertFormatAsync(code, code, SpecializedCollections.SingletonEnumerable(new TextSpan(0, code.Length)), debugMode, changedOptionSet, testWithTransformation, parseOptions); 44return AssertFormatAsync(expected, code, SpecializedCollections.SingletonEnumerable(new TextSpan(0, code.Length)), debugMode, changedOptionSet, testWithTransformation, parseOptions);
Microsoft.CodeAnalysis.EditorFeatures (27)
BracePairs\BracePairsTaggerProvider.cs (1)
75return SpecializedCollections.SingletonEnumerable(visibleSpanOpt.Value);
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (1)
91return SpecializedCollections.SingletonEnumerable(visibleSpanOpt.Value);
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
350return GetTagsWorker(spans) ?? SpecializedCollections.EmptyEnumerable<ITagSpan<IClassificationTag>>();
Editor\TextBufferAssociatedViewService.cs (1)
101return SpecializedCollections.EmptyList<ITextView>();
InlineHints\InlineHintsDataTaggerProvider.cs (1)
100return SpecializedCollections.SingletonEnumerable(visibleSpanOpt.Value);
InlineRename\InlineRenameSession.cs (3)
258_openTextBuffers[triggerSpan.Snapshot.TextBuffer].SetReferenceSpans(SpecializedCollections.SingletonEnumerable(startingSpan.ToTextSpan())); 433_openTextBuffers[textBuffer].SetReferenceSpans(SpecializedCollections.EmptyEnumerable<TextSpan>()); 643SpecializedCollections.EmptyList<InlineRenameReplacementKind>()));
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (3)
458: SpecializedCollections.EmptyEnumerable<TextSpan>(); 549return SpecializedCollections.EmptyEnumerable<TextChange>(); 562return SpecializedCollections.EmptyEnumerable<TextChange>();
Options\EditorAnalyzerConfigOptions.cs (1)
24SpecializedCollections.EmptyDictionary<string, object>();
Preview\SolutionPreviewResult.cs (1)
33_previews = previews ?? SpecializedCollections.EmptyList<SolutionPreviewItem>();
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (2)
64return Task.FromResult(SpecializedCollections.SingletonEnumerable(committerOperation as CodeActionOperation)); 77return SpecializedCollections.SingletonEnumerable(
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
245documentIds: SpecializedCollections.SingletonEnumerable(document.Id), highPriority: true);
Shared\Extensions\HostWorkspaceServicesExtensions.cs (2)
99return SpecializedCollections.EmptyList<T>(); 114return SpecializedCollections.EmptyList<T>();
Shared\Extensions\ITextSnapshotExtensions.cs (1)
47var result = formatter.GetFormattingResult(documentSyntax.Root, SpecializedCollections.SingletonEnumerable(span), options, rules, cancellationToken);
Shared\Tagging\Utilities\TagSpanIntervalTree.cs (2)
66return result ?? SpecializedCollections.EmptyList<ITagSpan<TTag>>(); 142return SpecializedCollections.EmptyEnumerable<ITagSpan<TTag>>();
Shared\Utilities\ThreadingContextTaskSchedulerProvider.cs (1)
40=> SpecializedCollections.EmptyEnumerable<Task>();
Tagging\AbstractAsynchronousTaggerProvider.cs (1)
217return SpecializedCollections.SingletonEnumerable(subjectBuffer.CurrentSnapshot.GetFullSpan());
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (1)
387OnTagsChangedForBuffer(SpecializedCollections.SingletonCollection(
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (3)
92: this.AccumulatedTextChanges.Accumulate(SpecializedCollections.SingletonEnumerable(textChangeRange)); 559return SpecializedCollections.EmptyEnumerable<ITagSpan<TTag>>(); 565? SpecializedCollections.EmptyEnumerable<ITagSpan<TTag>>()
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (2)
NavigableSymbolService.NavigableSymbol.cs (1)
45=> SpecializedCollections.SingletonEnumerable(PredefinedNavigableRelationships.Definition);
SignatureHelpClassifier.cs (1)
58return SpecializedCollections.EmptyList<ClassificationSpan>();
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (5)
ChangeSignature\AbstractChangeSignatureTests.cs (3)
255yield return SpecializedCollections.EmptyEnumerable<int>(); 290return SpecializedCollections.SingletonEnumerable(SpecializedCollections.EmptyEnumerable<int>());
Diagnostics\AbstractSuppressionAllCodeTests.cs (1)
92var fixes = fixer.GetFixesAsync(document, diagnostic.Location.SourceSpan, SpecializedCollections.SingletonEnumerable(diagnostic), CodeActionOptions.DefaultProvider, CancellationToken.None).GetAwaiter().GetResult();
Diagnostics\AbstractUserDiagnosticTest.cs (1)
205var diagnosticsToFix = ImmutableDictionary.CreateRange(SpecializedCollections.SingletonEnumerable(KeyValuePairUtil.Create(document, diagnostics.ToImmutableArray())));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (18)
Diagnostics\TestDiagnosticAnalyzerDriver.cs (2)
56var documentDiagnostics = SpecializedCollections.EmptyEnumerable<Diagnostic>(); 57var projectDiagnostics = SpecializedCollections.EmptyEnumerable<Diagnostic>();
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
29? SpecializedCollections.SingletonEnumerable(sourceCodeKind.Value)
Preview\MockPreviewPaneService.cs (1)
30var contents = previewContents ?? SpecializedCollections.EmptyEnumerable<object>();
Threading\WpfFactDiscoverer.cs (2)
35return SpecializedCollections.SingletonEnumerable(testCase); 41return SpecializedCollections.SingletonEnumerable(testCase);
Workspaces\TestHostProject.cs (12)
190_analyzerReferences = analyzerReferences ?? SpecializedCollections.EmptyEnumerable<AnalyzerReference>(); 192this.AdditionalDocuments = additionalDocuments ?? SpecializedCollections.EmptyEnumerable<TestHostDocument>(); 193this.AnalyzerConfigDocuments = analyzerConfigDocuments ?? SpecializedCollections.EmptyEnumerable<TestHostDocument>(); 194ProjectReferences = SpecializedCollections.EmptyEnumerable<ProjectReference>(); 215: this(workspace, name, language, compilationOptions, parseOptions, SpecializedCollections.SingletonEnumerable(document), SpecializedCollections.EmptyEnumerable<TestHostDocument>(), SpecializedCollections.EmptyEnumerable<TestHostDocument>(), projectReferences, metadataReferences, analyzerReferences, assemblyName, defaultNamespace) 243this.Documents = documents ?? SpecializedCollections.EmptyEnumerable<TestHostDocument>(); 244this.AdditionalDocuments = additionalDocuments ?? SpecializedCollections.EmptyEnumerable<TestHostDocument>(); 245this.AnalyzerConfigDocuments = analyzerConfigDocuments ?? SpecializedCollections.EmptyEnumerable<TestHostDocument>(); 246ProjectReferences = projectReferences != null ? projectReferences.Select(p => new ProjectReference(p.Id)) : SpecializedCollections.EmptyEnumerable<ProjectReference>(); 248_analyzerReferences = analyzerReferences ?? SpecializedCollections.EmptyEnumerable<AnalyzerReference>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (43)
CodeFixes\CodeFixServiceTests.cs (9)
53var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => workspace.Services.GetRequiredService<IErrorLoggerService>())); 55diagnosticService, logger, fixers, SpecializedCollections.EmptyEnumerable<Lazy<IConfigurationFixProvider, CodeChangeProviderMetadata>>()); 335var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => new TestErrorLogger())); 340: SpecializedCollections.EmptyEnumerable<Lazy<IConfigurationFixProvider, CodeChangeProviderMetadata>>(); 378return SpecializedCollections.SingletonEnumerable( 691? SpecializedCollections.SingletonEnumerable(new Lazy<CodeFixProvider, CodeChangeProviderMetadata>(() => vsixFixer, new CodeChangeProviderMetadata(name: nameof(VsixCodeFixProvider), languages: LanguageNames.CSharp))) 692: SpecializedCollections.EmptyEnumerable<Lazy<CodeFixProvider, CodeChangeProviderMetadata>>(); 699var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => workspace.Services.GetRequiredService<IErrorLoggerService>())); 701diagnosticService, logger, vsixFixers, SpecializedCollections.EmptyEnumerable<Lazy<IConfigurationFixProvider, CodeChangeProviderMetadata>>());
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
411var parameterSymbols = SpecializedCollections.EmptyList<AttributeData>();
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
56SpecializedCollections.EmptyEnumerable<KeyValuePair<DocumentId, CommittedSolution.DocumentState>>(),
MetadataAsSource\AbstractMetadataAsSourceTests.cs (2)
50using var context = TestContext.Create(projectLanguage, SpecializedCollections.SingletonEnumerable(metadataSource), includeXmlDocComments, languageVersion: languageVersion, metadataLanguageVersion: metadataLanguageVersion, metadataCommonReferences: metadataCommonReferences); 106using var context = TestContext.Create(projectLanguage, SpecializedCollections.SingletonEnumerable(metadataSource));
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
46metadataSources ??= SpecializedCollections.EmptyEnumerable<string>();
MetadataAsSource\MetadataAsSourceTests.cs (26)
981LanguageNames.CSharp, SpecializedCollections.SingletonEnumerable(metadataSource), languageVersion: "10"); 1003LanguageNames.CSharp, SpecializedCollections.SingletonEnumerable(metadataSource), languageVersion: "9"); 1025LanguageNames.CSharp, SpecializedCollections.SingletonEnumerable(metadataSource), languageVersion: "10"); 1704using var context = TestContext.Create(LanguageNames.CSharp, SpecializedCollections.SingletonEnumerable(metadataSource)); 2698SpecializedCollections.SingletonEnumerable(metadata), 2740SpecializedCollections.SingletonEnumerable(metadata), 3204SpecializedCollections.SingletonEnumerable(metadata), 3244SpecializedCollections.SingletonEnumerable(metadata), 3273SpecializedCollections.SingletonEnumerable(metadata), 4751SpecializedCollections.SingletonEnumerable(metadata), 4793SpecializedCollections.SingletonEnumerable(metadata), 4824SpecializedCollections.SingletonEnumerable(metadata), 4882SpecializedCollections.SingletonEnumerable(metadata), 4937SpecializedCollections.SingletonEnumerable(metadata), 5000SpecializedCollections.SingletonEnumerable(metadata), 5050SpecializedCollections.SingletonEnumerable(metadata), 5101SpecializedCollections.SingletonEnumerable(metadata), 5149SpecializedCollections.SingletonEnumerable(metadata), 5197SpecializedCollections.SingletonEnumerable(metadata), 5243SpecializedCollections.SingletonEnumerable(metadata), 5289SpecializedCollections.SingletonEnumerable(metadata), 5335SpecializedCollections.SingletonEnumerable(metadata), 5379SpecializedCollections.SingletonEnumerable(metadata), 5443SpecializedCollections.SingletonEnumerable(metadata), 5517SpecializedCollections.SingletonEnumerable(metadata), 5561SpecializedCollections.SingletonEnumerable(metadata),
RenameTracking\RenameTrackingTestState.cs (1)
116SpecializedCollections.SingletonEnumerable(_mockRefactorNotifyService));
SolutionCrawler\WorkCoordinatorTests.cs (1)
673service.Reanalyze(workspace, worker, projectIds: null, documentIds: SpecializedCollections.SingletonEnumerable(info.Id), highPriority: false);
TextEditor\TextBufferAssociatedViewServiceTests.cs (1)
34var bufferCollection = new Collection<ITextBuffer>(SpecializedCollections.SingletonEnumerable(bufferMock.Object).ToList());
Microsoft.CodeAnalysis.EditorFeatures.Wpf (9)
Interactive\InertClassifierProvider.InertClassifier.cs (1)
38return SpecializedCollections.EmptyList<ClassificationSpan>();
Interactive\InteractiveWindowResetCommand.cs (1)
54=> SpecializedCollections.SingletonEnumerable(CommandName);
NavigableSymbols\NavigableSymbolService.NavigableSymbol.cs (1)
45=> SpecializedCollections.SingletonEnumerable(PredefinedNavigableRelationships.Definition);
NavigateTo\NavigateToItemDisplay.cs (1)
143=> SpecializedCollections.EmptyReadOnlyList<Span>();
Peek\DefinitionPeekableItem.cs (1)
44=> SpecializedCollections.SingletonEnumerable(PredefinedPeekRelationships.Definitions);
Peek\ExternalFilePeekableItem.cs (1)
31get { return SpecializedCollections.SingletonEnumerable(_relationship); }
Preview\AbstractPreviewTaggerProvider.cs (1)
53return SpecializedCollections.EmptyEnumerable<ITagSpan<TTag>>();
SignatureHelp\Presentation\SignatureHelpClassifier.cs (1)
58return SpecializedCollections.EmptyList<ClassificationSpan>();
WpfClassificationExtensions.cs (1)
103=> SpecializedCollections.SingletonEnumerable(part).ToTextBlock(formatMap, typeMap);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (12)
CodeDefinitionWindow\CrossLanguageCodeDefinitionWindowTests.vb (1)
90Return Task.FromResult(SpecializedCollections.SingletonEnumerable(Of INavigableItem)(New FakeNavigableItem(document)))
CodeFixes\CodeFixServiceTests.vb (4)
60Dim logger = SpecializedCollections.SingletonEnumerable(New Lazy(Of IErrorLoggerService)(Function() workspace.Services.GetService(Of IErrorLoggerService))) 67SpecializedCollections.EmptyEnumerable(Of Lazy(Of IConfigurationFixProvider, Mef.CodeChangeProviderMetadata))) 139Dim logger = SpecializedCollections.SingletonEnumerable(New Lazy(Of IErrorLoggerService)(Function() workspace.Services.GetService(Of IErrorLoggerService))) 146SpecializedCollections.EmptyEnumerable(Of Lazy(Of IConfigurationFixProvider, Mef.CodeChangeProviderMetadata)))
Diagnostics\DiagnosticProviderTests.vb (1)
300service.GetTestAccessor().WaitUntilCompletion(workspace, SpecializedCollections.SingletonEnumerable(analyzerService.CreateIncrementalAnalyzer(workspace)).WhereNotNull().ToImmutableArray())
Diagnostics\DiagnosticServiceTests.vb (2)
333p1 = p1.WithAnalyzerReferences(SpecializedCollections.SingletonCollection(New AnalyzerImageReference(ImmutableArray.Create(analyzer1)))) 337p2 = p2.WithAnalyzerReferences(SpecializedCollections.SingletonCollection(New AnalyzerImageReference(ImmutableArray.Create(analyzer2))))
IntelliSense\VisualBasicCompletionCommandHandlerTests.vb (1)
3481Return SpecializedCollections.SingletonEnumerable(New SnippetInfo("Shortcut", "Title", "Description", "Path"))
Rename\RenameTagProducerTests.vb (3)
29Await VerifyTaggedSpansCore(tagType, actualWorkspace, renameService, SpecializedCollections.EmptyEnumerable(Of Span)) 47expectedSpans = SpecializedCollections.EmptyEnumerable(Of Span) 61Return SpecializedCollections.EmptyEnumerable(Of Span)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (4)
Editor\FSharpNavigationBarItem.cs (1)
38this.ChildItems = childItems ?? SpecializedCollections.EmptyList<FSharpNavigationBarItem>();
Internal\Editor\FSharpNavigationBarItemService.cs (1)
61=> (items ?? SpecializedCollections.EmptyList<FSharpNavigationBarItem>()).Where(x => x.Spans.Any()).SelectAsArray(x => ConvertToNavigationBarItem(x, textVersion));
SignatureHelp\FSharpSignatureHelpItem.cs (1)
40_ => SpecializedCollections.EmptyEnumerable<TaggedText>();
SignatureHelp\FSharpSignatureHelpParameter.cs (1)
57_ => SpecializedCollections.EmptyEnumerable<TaggedText>();
Microsoft.CodeAnalysis.Features (84)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (2)
46return SpecializedCollections.SingletonEnumerable<CodeActionOperation>(operation); 55return SpecializedCollections.SingletonEnumerable<CodeActionOperation>(operation);
AddImport\CodeActions\InstallWithPackageManagerCodeAction.cs (1)
35return Task.FromResult(SpecializedCollections.SingletonEnumerable<CodeActionOperation>(
AddImport\CodeActions\SymbolReference.SymbolReferenceCodeAction.cs (2)
41return SpecializedCollections.SingletonEnumerable(operation); 52return SpecializedCollections.SingletonEnumerable(operation);
AddMissingReference\AddMissingReferenceCodeAction.cs (2)
89return Task.FromResult(SpecializedCollections.SingletonEnumerable<CodeActionOperation>( 97return Task.FromResult(SpecializedCollections.SingletonEnumerable(operation));
AddPackage\InstallPackageDirectlyCodeAction.cs (1)
43=> Task.FromResult(SpecializedCollections.SingletonEnumerable(_installPackageOperation));
AddPackage\InstallWithPackageManagerCodeAction.cs (1)
32return Task.FromResult(SpecializedCollections.SingletonEnumerable<CodeActionOperation>(
ChangeSignature\ChangeSignatureCodeAction.cs (2)
47return SpecializedCollections.SingletonEnumerable<CodeActionOperation>(new ChangeSignatureCodeActionOperation(changeSignatureResult.UpdatedSolution, changeSignatureResult.ConfirmationMessage)); 51return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
209SpecializedCollections.SingletonEnumerable((optionName, optionValue, isPerLanguage)),
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
218return SpecializedCollections.EmptyEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>>();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
89var newSuppressionFixes = await suppressionFixProvider.GetFixesAsync(currentDocument, currentDiagnosticSpan, SpecializedCollections.SingletonEnumerable(diagnostic), fallbackOptions, cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningBatchFixAllProvider.cs (1)
42document, span, SpecializedCollections.SingletonEnumerable(diagnostic), fixAllState.CodeActionOptionsProvider, cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (2)
49document, span, SpecializedCollections.SingletonEnumerable(diagnostic), fixAllState.CodeActionOptionsProvider, cancellationToken).ConfigureAwait(false); 94project, SpecializedCollections.SingletonEnumerable(diagnostic), fixAllState.CodeActionOptionsProvider, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
205return SpecializedCollections.EmptyEnumerable<CompletionItem>();
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (1)
92return SpecializedCollections.EmptyEnumerable<INamedTypeSymbol>();
Completion\Providers\Scripting\GlobalAssemblyCacheCompletionHelper.cs (1)
68SpecializedCollections.EmptyEnumerable<AssemblyIdentity>());
Debugging\AbstractBreakpointResolver.cs (1)
133return SpecializedCollections.EmptyList<ISymbol>();
DeclarationComputer.cs (1)
34return GetDeclarationInfo(model, node, getSymbol, SpecializedCollections.SingletonEnumerable(executableCodeBlock), cancellationToken);
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (3)
500state.AppendParts(SpecializedCollections.SingletonEnumerable(new TaggedText(displayKind, text, style, navigationTarget, navigationHint))); 524return SpecializedCollections.SingletonEnumerable( 545return SpecializedCollections.SingletonEnumerable(
EditAndContinue\EditAndContinueWorkspaceService.cs (1)
141initialDocumentStates = SpecializedCollections.EmptyEnumerable<KeyValuePair<DocumentId, CommittedSolution.DocumentState>>();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (2)
669projectIds ??= SpecializedCollections.EmptyEnumerable<ProjectId>(); 670documentIds ??= SpecializedCollections.EmptyEnumerable<DocumentId>();
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
76return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
ExtractInterface\ExtractInterfaceCodeAction.cs (1)
41var operations = SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
ExtractMethod\AbstractSyntaxTriviaService.cs (1)
77var emptyList = SpecializedCollections.EmptyEnumerable<SyntaxTrivia>();
ExtractMethod\AbstractSyntaxTriviaService.Result.cs (3)
152return new LeadingTrailingTriviaPair { TrailingTrivia = SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(), LeadingTrivia = trivia }; 279var trailingTrivia = previousTriviaPair.TrailingTrivia ?? SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(); 280var leadingTrivia = nextTriviaPair.LeadingTrivia ?? SpecializedCollections.EmptyEnumerable<SyntaxTrivia>();
ExtractMethod\ExtractMethodResult.cs (1)
71Reasons = (reasons ?? SpecializedCollections.EmptyEnumerable<string>()).ToReadOnlyCollection();
ExtractMethod\InsertionPoint.cs (1)
23var newRoot = root.AddAnnotations(SpecializedCollections.SingletonEnumerable(Tuple.Create(node, annotation)));
ExtractMethod\MethodExtractor.Analyzer.cs (4)
817var candidates = SpecializedCollections.EmptyEnumerable<ITypeParameterSymbol>(); 846return SpecializedCollections.EmptyEnumerable<ITypeParameterSymbol>(); 853return SpecializedCollections.EmptyEnumerable<ITypeParameterSymbol>(); 858return SpecializedCollections.EmptyEnumerable<ITypeParameterSymbol>();
ExtractMethod\OperationStatus.cs (2)
20Reasons = reason == null ? SpecializedCollections.EmptyEnumerable<string>() : SpecializedCollections.SingletonEnumerable(reason);
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);
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.GenerateConstructorWithDialogCodeAction.cs (2)
73return SpecializedCollections.EmptyEnumerable<CodeActionOperation>(); 93return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndHashWithDialogCodeAction.cs (1)
68return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
GenerateMember\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
174reservedNames ??= SpecializedCollections.EmptyList<string>();
GenerateMember\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
80SpecializedCollections.SingletonEnumerable(localStatement),
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
65return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
GenerateType\AbstractGenerateTypeService.CodeAction.cs (1)
177var operations = SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
GenerateType\AbstractGenerateTypeService.cs (1)
275: SpecializedCollections.EmptyEnumerable<ITypeParameterSymbol>();
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
484folders = SpecializedCollections.EmptyList<string>();
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
324: SpecializedCollections.EmptyEnumerable<ITypeParameterSymbol>();
ImplementAbstractClass\ImplementAbstractClassData.cs (1)
67SpecializedCollections.SingletonEnumerable(abstractClassType),
ImplementInterface\AbstractImplementInterfaceService.CodeAction.cs (1)
310return SpecializedCollections.EmptyEnumerable<ISymbol?>();
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
681return SpecializedCollections.SingletonEnumerable(_expression);
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (2)
528SpecializedCollections.SingletonEnumerable(newIfBody), original: ifBody)); 555SpecializedCollections.SingletonEnumerable(newIfBody), ifBody));
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (2)
73SpecializedCollections.EmptyDictionary<INamedTypeSymbol, string>(), 74SpecializedCollections.EmptyList<SymbolDisplayPart>());
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (1)
56return SpecializedCollections.EmptyDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>();
MetadataAsSource\AbstractMetadataAsSourceService.cs (1)
74SpecializedCollections.SingletonEnumerable(node.FullSpan),
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
58return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
MoveToNamespace\AbstractMoveToNamespaceCodeAction.cs (1)
68return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
NamingStyleCodeFixProvider.cs (1)
155return SpecializedCollections.SingletonEnumerable(
Navigation\NavigableItemFactory.cs (2)
50var generatedSourceLocations = candidateLocationGroups.SingleOrDefault(g => g.Key) ?? SpecializedCollections.EmptyEnumerable<Location>(); 51var nonGeneratedSourceLocations = candidateLocationGroups.SingleOrDefault(g => !g.Key) ?? SpecializedCollections.EmptyEnumerable<Location>();
Organizing\Organizers\AbstractSyntaxNodeOrganizer.cs (1)
19get { return SpecializedCollections.SingletonEnumerable(typeof(TSyntaxNode)); }
PopulateSwitchExpressionHelpers.cs (1)
38return SpecializedCollections.EmptyCollection<ISymbol>();
PopulateSwitchStatementHelpers.cs (1)
62return SpecializedCollections.EmptyCollection<ISymbol>();
PullMemberUp\Dialog\PullMemberUpWithDialogCodeAction.cs (1)
58return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
174? SpecializedCollections.EmptyEnumerable<ReferencedSymbol>()
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (2)
402? SpecializedCollections.EmptyEnumerable<SyntaxNode>() 403: SpecializedCollections.SingletonEnumerable(argument);
Shared\Utilities\SupportedPlatformData.cs (1)
34return SpecializedCollections.EmptyList<SymbolDisplayPart>();
SignatureHelp\AbstractSignatureHelpProvider.cs (1)
181? SpecializedCollections.EmptyList<SymbolDisplayPart>()
SignatureHelp\SignatureHelpItem.cs (1)
39_ => SpecializedCollections.EmptyEnumerable<TaggedText>();
SignatureHelp\SignatureHelpParameter.cs (2)
62_ => SpecializedCollections.EmptyEnumerable<TaggedText>(); 142_ => SpecializedCollections.EmptyEnumerable<TaggedText>();
SolutionCrawler\WorkCoordinator.cs (2)
602projectIds ??= SpecializedCollections.EmptyEnumerable<ProjectId>(); 603documentIds ??= SpecializedCollections.EmptyEnumerable<DocumentId>();
Workspace\MiscellaneousFileUtilities.cs (1)
74documents: SpecializedCollections.SingletonEnumerable(documentInfo),
Microsoft.CodeAnalysis.LanguageServer.Protocol (16)
Features\Diagnostics\DiagnosticAnalyzerService_IncrementalAnalyzer.cs (1)
48=> Reanalyze(e.Solution.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(e.NewActiveContextDocumentId), highPriority: true);
Features\Diagnostics\DocumentAnalysisExecutor.cs (8)
81? SpecializedCollections.SingletonEnumerable(DiagnosticData.Create(loadDiagnostic, textDocument)) 82: SpecializedCollections.EmptyEnumerable<DiagnosticData>(); 87return SpecializedCollections.EmptyEnumerable<DiagnosticData>(); 100return SpecializedCollections.EmptyEnumerable<DiagnosticData>(); 108return SpecializedCollections.EmptyEnumerable<DiagnosticData>(); 126return SpecializedCollections.EmptyEnumerable<DiagnosticData>(); 139return SpecializedCollections.EmptyEnumerable<DiagnosticData>(); 146return SpecializedCollections.EmptyEnumerable<DiagnosticData>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (1)
139var analyzerAndExistingData = SpecializedCollections.SingletonEnumerable((analyzer, existingData));
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateSet.cs (3)
69return SpecializedCollections.EmptyEnumerable<ProjectId>(); 78return SpecializedCollections.EmptyEnumerable<ProjectId>(); 82return SpecializedCollections.SingletonEnumerable(documentId.ProjectId);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (2)
88var documentIds = (DocumentId != null) ? SpecializedCollections.SingletonEnumerable(DocumentId) : project.DocumentIds; 245await AppendDiagnosticsAsync(project, SpecializedCollections.EmptyEnumerable<DocumentId>(), includeProjectNonLocalResult: true, cancellationToken).ConfigureAwait(false);
Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (1)
45var textChanges = Formatter.GetFormattedTextChanges(root, SpecializedCollections.SingletonEnumerable(formattingSpan), services, formattingOptions, rules: null, cancellationToken);
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (1)
Graph\Edge.cs (1)
28public IEnumerable<Id<Vertex>> GetInVerticies() => InVertices ?? SpecializedCollections.SingletonEnumerable(InVertex!.Value);
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
FaultReporter.cs (2)
217return SpecializedCollections.EmptyList<string>(); 239return SpecializedCollections.EmptyList<string>();
Host\RemoteWorkspace.SolutionCreator.cs (1)
157solution = solution.WithProjectReferences(projectId, SpecializedCollections.EmptyEnumerable<ProjectReference>());
Microsoft.CodeAnalysis.Remote.Workspaces (1)
SolutionAssetStorage.Scope.cs (1)
98using var checksumPool = Creator.CreateChecksumSet(SpecializedCollections.SingletonEnumerable(checksum));
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
AutomaticCompletion\AutomaticLineEnderCommandHandler.vb (1)
59Return SpecializedCollections.EmptyList(Of TextChange)
EndConstructGeneration\EndConstructStatementVisitor_IfStatement.vb (1)
65Dim indentedWhitespaceTrivia = SpecializedCollections.SingletonEnumerable(SyntaxFactory.WhitespaceTrivia(indentedWhitespace))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (2)
KeywordHighlighting\AbstractVisualBasicKeywordHighlighterTests.vb (1)
14Return SpecializedCollections.SingletonEnumerable(TestOptions.Regular)
SignatureHelp\InvocationExpressionSignatureHelpProviderTests.vb (1)
1924Await TestAsync(markup, SpecializedCollections.SingletonEnumerable(New SignatureHelpTestItem("C.Next()", String.Empty)))
Microsoft.CodeAnalysis.VisualBasic.Features (52)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
738Return SpecializedCollections.SingletonEnumerable(Of AbstractFormattingRule)(New ChangeSignatureFormattingRule()).Concat(Formatter.GetDefaultFormattingRules(document))
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
89Return SpecializedCollections.EmptyEnumerable(Of CodeAction)()
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (1)
64Dim result = SpecializedCollections.EmptyEnumerable(Of CodeAction)()
Completion\CompletionProviders\CrefCompletionProvider.vb (1)
173Return SpecializedCollections.EmptyEnumerable(Of ISymbol)
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (3)
163Return SpecializedCollections.SingletonEnumerable( 177SpecializedCollections.EmptyList(Of IPropertySymbol), 187Return SpecializedCollections.SingletonEnumerable(delegateType.DelegateInvokeMethod.Parameters.As(Of ISymbol)())
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (3)
169Return SpecializedCollections.EmptyEnumerable(Of CompletionItem) 203Return SpecializedCollections.SingletonEnumerable(CreateCompletionItem(nameToken.ValueText, beforeCaretText:=nameToken.ValueText & ">", afterCaretText:=String.Empty)) 292Dim attributeValues = SpecializedCollections.EmptyEnumerable(Of String)()
ConvertIfToSwitch\VisualBasicConvertIfToSwitchCodeRefactoringProvider.Rewriting.vb (1)
32Return If(node.IsStatementContainerNode(), node.GetStatements(), SpecializedCollections.SingletonEnumerable(node))
Debugging\BreakpointResolver.vb (1)
83nameParts = SpecializedCollections.EmptyList(Of NameAndArity)()
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (2)
314Return SpecializedCollections.SingletonEnumerable(propertyStatement.Identifier).Concat(If(propertyStatement.AsClause?.DescendantTokens(), 319Return SpecializedCollections.SingletonEnumerable(propertyStatement.Identifier).Concat(propertyStatement.AsClause.DescendantTokens())
EncapsulateField\VisualBasicEncapsulateFieldService.vb (1)
59Dim newModifiers = SpecializedCollections.SingletonEnumerable(SyntaxFactory.Token(SyntaxKind.PrivateKeyword)).Concat(useableModifiers)
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (2)
211Return SpecializedCollections.SingletonEnumerable(Of StatementSyntax)(newDeclaration).Concat(statements.Skip(2)).ToImmutableArray() 244Return SpecializedCollections.SingletonEnumerable(Of StatementSyntax)(
ExtractMethod\VisualBasicMethodExtractor.TriviaResult.vb (4)
87SpecializedCollections.SingletonEnumerable(Of SyntaxTrivia)(SyntaxFactory.ElasticMarker), 88SpecializedCollections.EmptyEnumerable(Of SyntaxTrivia)()) 94Dim trailingTrivia = If(previousTriviaPair.TrailingTrivia, SpecializedCollections.EmptyEnumerable(Of SyntaxTrivia)()) 95Dim leadingTrivia = If(nextTriviaPair.LeadingTrivia, SpecializedCollections.EmptyEnumerable(Of SyntaxTrivia)())
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
427SpecializedCollections.SingletonEnumerable(SyntaxFactory.ElasticCarriageReturnLineFeed)))
ExtractMethod\VisualBasicSelectionValidator.vb (1)
585Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)()
LambdaUtilities.vb (5)
361Return SpecializedCollections.SingletonEnumerable(DirectCast(lambda, SingleLineLambdaExpressionSyntax).Body) 375Return SpecializedCollections.SingletonEnumerable(lambdaBody) 381Return SpecializedCollections.SingletonEnumerable(lambdaBody) 402Return SpecializedCollections.SingletonEnumerable(lambdaBody) 411Return SpecializedCollections.SingletonEnumerable(lambdaBody)
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
70Return SpecializedCollections.EmptyEnumerable(Of Tuple(Of INamedTypeSymbol, SyntaxNode))()
SignatureHelp\AbstractIntrinsicOperatorSignatureHelpProvider.vb (1)
76documentationFactory:=Function(c) SpecializedCollections.SingletonEnumerable(New TaggedText(TextTags.Text, documentation.DocumentationText)),
SignatureHelp\AddRemoveHandlerSignatureHelpProvider.vb (3)
25Return ValueTaskFactory.FromResult(SpecializedCollections.SingletonEnumerable(Of AbstractIntrinsicOperatorDocumentation)(New AddHandlerStatementDocumentation())) 27Return ValueTaskFactory.FromResult(SpecializedCollections.SingletonEnumerable(Of AbstractIntrinsicOperatorDocumentation)(New RemoveHandlerStatementDocumentation())) 30Return ValueTaskFactory.FromResult(SpecializedCollections.EmptyEnumerable(Of AbstractIntrinsicOperatorDocumentation)())
SignatureHelp\CastExpressionSignatureHelpProvider.vb (1)
32Return ValueTaskFactory.FromResult(SpecializedCollections.EmptyEnumerable(Of AbstractIntrinsicOperatorDocumentation)())
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (2)
141Return SpecializedCollections.EmptyList(Of SignatureHelpSymbolParameter)() 170Return SpecializedCollections.EmptyList(Of SignatureHelpSymbolParameter)()
SignatureHelp\InvocationExpressionSignatureHelpProvider.DelegateInvoke.vb (2)
23Return SpecializedCollections.EmptyEnumerable(Of SignatureHelpItem)() 36Return SpecializedCollections.SingletonEnumerable(item)
SignatureHelp\InvocationExpressionSignatureHelpProvider.ElementAccess.vb (1)
29Return SpecializedCollections.EmptyEnumerable(Of SignatureHelpItem)()
SignatureHelp\InvocationExpressionSignatureHelpProvider.MemberGroup.vb (1)
43Return SpecializedCollections.EmptyEnumerable(Of SignatureHelpItem)()
SignatureHelp\InvocationExpressionSignatureHelpProvider.vb (1)
107SpecializedCollections.EmptyList(Of IPropertySymbol),
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.DelegateType.vb (1)
35Return (SpecializedCollections.SingletonList(item), 0)
SignatureHelp\PredefinedCastExpressionSignatureHelpProvider.vb (1)
27Return SpecializedCollections.SingletonEnumerable(New PredefinedCastExpressionDocumentation(node.Keyword.Kind, Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False)))
VisualBasicDeclarationComputer.vb (8)
91Dim codeBlocks = SpecializedCollections.SingletonEnumerable(Of SyntaxNode)(t.Initializer).Concat(attributes) 107Dim codeBlocks = SpecializedCollections.SingletonEnumerable(initializer).Concat(attributes) 157Dim codeBlocks = SpecializedCollections.SingletonEnumerable(Of SyntaxNode)(methodBlock). 175Dim attributes = SpecializedCollections.EmptyEnumerable(Of SyntaxNode) 190SpecializedCollections.SingletonEnumerable(initializer).Concat(codeBlocks), 239SpecializedCollections.EmptyEnumerable(Of SyntaxNode)) 253SpecializedCollections.EmptyEnumerable(Of SyntaxNode)) 257Return SpecializedCollections.SingletonEnumerable(Of SyntaxNode)(parameter.Default).Concat(GetAttributes(parameter.AttributeLists))
VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb (1)
57Return SpecializedCollections.SingletonEnumerable(tree.GetCompilationUnitRoot().Imports.GetContainedSpan())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (76)
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (1)
246newNode = node.ReplaceTokens(SpecializedCollections.SingletonEnumerable(previousToken).Concat(lastToken),
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (1)
208Return curNode.ReplaceTokens(SpecializedCollections.SingletonEnumerable(curEndKeyword).Concat(curIfKeyword),
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (1)
510Return node.ReplaceTokens(SpecializedCollections.SingletonEnumerable(modifier).Concat(previousToken),
CodeGeneration\VisualBasicSyntaxGenerator.vb (13)
2923SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode)) 2939Return SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode) 3120Return SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode) 3166Return SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode)() 3185Return SpecializedCollections.EmptyEnumerable(Of StatementSyntax) 3245Return SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode) 3290Return SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode)() 3383Return SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode)() 3471addAccessorStatements = SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 3475removeAccessorStatements = SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 3479raiseAccessorStatements = SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 3508Return SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode)() 3830Return SpecializedCollections.EmptyReadOnlyList(Of SyntaxNode)
DirectiveSyntaxExtensions.vb (1)
127Return SpecializedCollections.EmptyReadOnlyList(Of DirectiveTriviaSyntax)()
Extensions\SemanticModelExtensions.vb (1)
35reservedNames = If(reservedNames, SpecializedCollections.EmptyEnumerable(Of String))
Formatting\Engine\Trivia\TriviaDataFactory.AbstractLineBreakTrivia.vb (1)
49Return SpecializedCollections.SingletonEnumerable(New TextChange(textSpan, Me._newString))
Formatting\Rules\ElasticTriviaFormattingRule.vb (2)
70SpecializedCollections.SingletonEnumerable(initializer.CloseBraceToken), 81SpecializedCollections.SingletonEnumerable(collectionInitializer.Initializer.CloseBraceToken),
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
487symbols = SpecializedCollections.SingletonEnumerable(symbolInfo.Symbol)
SemanticModelExtensions.vb (2)
26Return SpecializedCollections.EmptyList(Of ITypeSymbol)() 38Return SpecializedCollections.EmptyList(Of ISymbol)()
SpecialFormattingOperation.vb (1)
217SpecializedCollections.SingletonEnumerable(baseToken.GetNextToken(includeZeroWidth:=True)),
SyntaxNodeExtensions.vb (2)
977Return SpecializedCollections.SingletonEnumerable(initializer.Value) 980Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)()
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)()
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)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Formatting\VisualBasicFormattingTestBase.vb (1)
99Return AssertFormatAsync(expected, code, SpecializedCollections.SingletonEnumerable(New TextSpan(0, code.Length)), debugMode, changedOptionSet, testWithTransformation, experimental:=experimental)
Microsoft.CodeAnalysis.Workspaces (102)
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));
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>();
BKTree.cs (1)
75return SpecializedCollections.EmptyList<string>();
CodeActions\CodeActionWithOptions.cs (1)
40return SpecializedCollections.EmptyEnumerable<CodeActionOperation>();
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (1)
81var kvp = SpecializedCollections.SingletonEnumerable(KeyValuePairUtil.Create(project, diagnostics));
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>();
CodeRefactorings\FixAllOccurences\FixAllState.cs (1)
113documentsToFix = SpecializedCollections.SingletonEnumerable(Document);
Diagnostics\DiagnosticAnalysisResult.cs (1)
312var documents = SpecializedCollections.EmptyEnumerable<DocumentId>();
DocumentExtensions.cs (1)
163ignoreErrorCode ??= SpecializedCollections.EmptyList<string>();
Editing\ImportAdder.cs (1)
23return SpecializedCollections.SingletonEnumerable(root.FullSpan);
EnumerableExtensions.cs (4)
75return SpecializedCollections.EmptyBoxedImmutableArray<T>(); 80return array.IsDefaultOrEmpty ? SpecializedCollections.EmptyBoxedImmutableArray<T>() : (IReadOnlyList<T>)items; 85return SpecializedCollections.EmptyBoxedImmutableArray<T>(); 292return SpecializedCollections.EmptyEnumerable<T>();
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
428return SpecializedCollections.EmptySet<ProjectId>();
FindSymbols\SymbolFinder_Hierarchy.cs (1)
136: SpecializedCollections.EmptyEnumerable<INamedTypeSymbol>();
Formatting\Formatter.cs (12)
67=> FormatAsync(document, SpecializedCollections.SingletonEnumerable(span), options, cancellationToken); 71=> FormatAsync(document, SpecializedCollections.SingletonEnumerable(span), options, rules: null, cancellationToken); 190=> Format(node, SpecializedCollections.SingletonEnumerable(node.FullSpan), workspace, options, rules: null, cancellationToken); 193=> Format(node, SpecializedCollections.SingletonEnumerable(node.FullSpan), services, options, rules: null, cancellationToken); 205=> Format(node, SpecializedCollections.SingletonEnumerable(span), workspace, options, rules: null, cancellationToken: cancellationToken); 208=> Format(node, SpecializedCollections.SingletonEnumerable(span), services, options, rules: null, cancellationToken: cancellationToken); 250spans ??= SpecializedCollections.SingletonEnumerable(node.FullSpan); 270=> GetFormattedTextChanges(node, SpecializedCollections.SingletonEnumerable(node.FullSpan), workspace, options, rules: null, cancellationToken: cancellationToken); 273=> GetFormattedTextChanges(node, SpecializedCollections.SingletonEnumerable(node.FullSpan), services, options, rules: null, cancellationToken: cancellationToken); 285=> GetFormattedTextChanges(node, SpecializedCollections.SingletonEnumerable(span), workspace, options, rules: null, cancellationToken); 288=> GetFormattedTextChanges(node, SpecializedCollections.SingletonEnumerable(span), services, options, rules: null, cancellationToken); 309? SpecializedCollections.EmptyList<TextChange>()
FormattingExtensions.cs (1)
37=> SpecializedCollections.SingletonEnumerable(rule).Concat(rules);
IAddImportsService.cs (1)
50SpecializedCollections.SingletonEnumerable(newImport), generator, options, cancellationToken);
ImmutableHashMap.cs (1)
687=> SpecializedCollections.SingletonEnumerable(this);
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));
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs\INamedTypeSymbolExtensions.cs (1)
398? SpecializedCollections.EmptyEnumerable<INamedTypeSymbol>()
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs\ITypeSymbolExtensions.cs (1)
436return SpecializedCollections.EmptyEnumerable<T>();
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (2)
40return ImmutableDictionary.CreateRange(SpecializedCollections.SingletonEnumerable( 64return ImmutableDictionary.CreateRange(SpecializedCollections.SingletonEnumerable(
OrderableMetadata.cs (2)
34this.AfterTyped = after ?? SpecializedCollections.EmptyEnumerable<string>(); 35this.BeforeTyped = before ?? SpecializedCollections.EmptyEnumerable<string>();
ParsedDocument.cs (1)
77return SpecializedCollections.EmptyEnumerable<TextChange>();
Recommendations\AbstractRecommendationService.cs (1)
56return SpecializedCollections.EmptySet<INamedTypeSymbol>();
Rename\ConflictEngine\MutableConflictResolution.cs (1)
95trivia: SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(),
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
58SpecializedCollections.EmptyEnumerable<(TextSpan oldSpan, TextSpan newSpan)>(); 68SpecializedCollections.EmptyEnumerable<MutableComplexifiedSpan>();
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (3)
237return SpecializedCollections.EmptyEnumerable<RenameLocation>(); 243return SpecializedCollections.EmptyEnumerable<RenameLocation>(); 250return SpecializedCollections.EmptyEnumerable<RenameLocation>();
Rename\TokenRenameInfo.cs (2)
39symbols: SpecializedCollections.SingletonEnumerable(symbol) 47symbols: SpecializedCollections.EmptyEnumerable<ISymbol>()
Serialization\AbstractOptionsSerializationService.cs (2)
148specificDiagnosticOptions = specificDiagnosticOptionsList ?? SpecializedCollections.EmptyEnumerable<KeyValuePair<string, ReportDiagnostic>>(); 212features = featuresList ?? SpecializedCollections.EmptyEnumerable<KeyValuePair<string, string>>();
Serialization\PooledList.cs (1)
21items.Object.UnionWith(checksums ?? SpecializedCollections.EmptyEnumerable<Checksum>());
SetWithInsertionOrder.cs (1)
89=> _elements is null ? SpecializedCollections.EmptyEnumerator<T>() : ((IEnumerable<T>)_elements).GetEnumerator();
Shared\Collections\IntervalTree.cs (1)
23return IntervalTree<T>.Create(in introspector, values ?? SpecializedCollections.EmptyEnumerable<T>());
Shared\Extensions\IFindReferencesResultExtensions.cs (1)
23? SpecializedCollections.SingletonEnumerable(definition.Locations.First())
Shared\Extensions\ILanguageServiceProviderExtensions.cs (1)
23return SpecializedCollections.EmptyEnumerable<Lazy<T, TMetadata>>();
Shared\Extensions\SyntaxGeneratorExtensions.cs (2)
94.Except(parameterToExistingFieldMap?.Values ?? SpecializedCollections.EmptyEnumerable<ISymbol>()) 196SpecializedCollections.SingletonEnumerable(throwStatement));
Simplification\AbstractSimplificationService.cs (1)
155trivia: SpecializedCollections.EmptyEnumerable<SyntaxTrivia>(),
Simplification\Simplifier.cs (2)
211return ReduceAsync(document, SpecializedCollections.SingletonEnumerable(span), optionSet, cancellationToken); 216=> ReduceAsync(document, SpecializedCollections.SingletonEnumerable(span), options, cancellationToken);
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);
SyntaxGeneratorExtensions.cs (1)
38SpecializedCollections.EmptyList<SyntaxNode>());
SyntaxTokenExtensions.cs (2)
29: SpecializedCollections.EmptyEnumerable<T>(); 36: SpecializedCollections.EmptyEnumerable<SyntaxNode>();
Workspace\Host\HostWorkspaceServices.cs (1)
92get { return SpecializedCollections.EmptyEnumerable<string>(); }
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
428SpecializedCollections.SingletonEnumerable(documentId));
Workspace\Solution\Document.cs (2)
374return SpecializedCollections.EmptyEnumerable<TextChange>(); 387return SpecializedCollections.EmptyEnumerable<TextChange>();
Workspace\Solution\ProjectInfo.cs (1)
254analyzerConfigDocuments: SpecializedCollections.EmptyBoxedImmutableArray<DocumentInfo>(),
Workspace\Solution\Solution.cs (4)
609SpecializedCollections.SingletonEnumerable( 717SpecializedCollections.SingletonEnumerable( 815SpecializedCollections.SingletonEnumerable( 915SpecializedCollections.SingletonEnumerable(
Workspace\Solution\SolutionState.cs (2)
131projectIds: SpecializedCollections.EmptyBoxedImmutableArray<ProjectId>(), 459SpecializedCollections.SingletonReadOnlyList(projectReference));
Workspace\Solution\SourceGeneratedDocumentState.cs (1)
40folders: SpecializedCollections.EmptyReadOnlyList<string>(),
Workspace\Solution\TextDocumentStates.cs (2)
196=> (_ids == oldStates._ids) ? SpecializedCollections.EmptyEnumerable<DocumentId>() : Except(_ids, oldStates._map); 202=> (_ids == oldStates._ids) ? SpecializedCollections.EmptyEnumerable<DocumentId>() : Except(oldStates._ids, _map);
Workspace\Workspace.cs (1)
89_latestSolution = CreateSolution(info, emptyOptions, analyzerReferences: SpecializedCollections.EmptyReadOnlyList<AnalyzerReference>());
Workspace\Workspace_Editor.cs (2)
199return SpecializedCollections.EmptyEnumerable<DocumentId>(); 209return SpecializedCollections.EmptyEnumerable<DocumentId>();
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
CodeCleanup\CodeCleanupTests.cs (6)
183expectedResult = SpecializedCollections.SingletonEnumerable(root.FullSpan); 205expectedResult = SpecializedCollections.SingletonEnumerable(root.FullSpan); 227expectedResult = SpecializedCollections.SingletonEnumerable(root.GetMember(0).GetMember(0).GetCodeCleanupSpan()); 249expectedResult = SpecializedCollections.SingletonEnumerable(root.GetMember(0).GetMember(0).GetCodeCleanupSpan()); 364expectedResult = SpecializedCollections.EmptyEnumerable<TextSpan>(); 381var expectedResult = namedSpans.ContainsKey("r") ? namedSpans["r"] as IEnumerable<TextSpan> : SpecializedCollections.EmptyEnumerable<TextSpan>();
SolutionTests\ProjectDependencyGraphTests.cs (2)
218SpecializedCollections.EmptyEnumerable<ProjectReference>()); 398SpecializedCollections.EmptyEnumerable<ProjectReference>());
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
91project = project.WithAnalyzerReferences(SpecializedCollections.EmptyEnumerable<AnalyzerReference>());
UtilityTest\SpecializedTasksTests.cs (1)
36var whenAll = SpecializedTasks.WhenAll(SpecializedCollections.EmptyEnumerable<ValueTask<int>>());
Microsoft.VisualStudio.LanguageServices (21)
AnalyzerDependency\AnalyzerFileWatcherService.cs (1)
69_updateSource.UpdateDiagnosticsForProject(projectId, Tuple.Create(s_analyzerChangedErrorId, analyzerPath), SpecializedCollections.SingletonEnumerable(diagnostic));
CallHierarchy\CallHierarchyProvider.cs (1)
146return SpecializedCollections.SingletonEnumerable(new FieldReferenceFinder(symbol, project.Id, AsyncListener, this));
CodeLens\RemoteCodeLensReferencesService.cs (1)
163var results = await spanMapper.MapSpansAsync(document, SpecializedCollections.SingletonEnumerable(span), cancellationToken).ConfigureAwait(false);
FindReferences\Entries\AbstractDocumentSpanEntry.cs (1)
67documentSpan.Document, SpecializedCollections.SingletonEnumerable(documentSpan.SourceSpan), cancellationToken).ConfigureAwait(false);
GenerateType\GenerateTypeDialogViewModel.cs (1)
781this.ProjectFolders = SpecializedCollections.EmptyList<string>();
InheritanceMargin\InheritanceMarginTaggerProvider.cs (1)
86return SpecializedCollections.SingletonEnumerable(visibleSpan.Value);
LanguageService\AbstractLanguageService`2.IVsLanguageTextOps.cs (1)
73var originalChanges = formatter.GetFormattingResult(root, SpecializedCollections.SingletonEnumerable(adjustedSpan), formattingOptions, rules, cancellationToken)
NavigationBar\NavigationBarClient.cs (2)
55_projectItems = SpecializedCollections.EmptyList<NavigationBarProjectItem>(); 56_currentTypeItems = SpecializedCollections.EmptyList<NavigationBarItem>();
Progression\SymbolContainment.cs (1)
30return SpecializedCollections.EmptyEnumerable<SyntaxNode>();
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
791AddDocumentToFolder(project, info.Id, SpecializedCollections.SingletonEnumerable(AppCodeFolderName), info.Name, documentKind, initialText, info.FilePath); 843return SpecializedCollections.EmptyEnumerable<ProjectItem>();
TableDataSource\Suppression\VisualStudioDiagnosticListTableCommandHandler.cs (1)
221_diagnosticService.Reanalyze(_workspace, documentIds: SpecializedCollections.SingletonEnumerable(selectedDiagnostic.DocumentId), highPriority: true);
Utilities\AutomationDelegatingListView.cs (2)
49var peersToProcess = new Queue<AutomationPeer>(base.GetChildrenCore() ?? SpecializedCollections.EmptyEnumerable<AutomationPeer>()); 60foreach (var childPeer in peer.GetChildren() ?? SpecializedCollections.EmptyEnumerable<AutomationPeer>())
Venus\ContainedDocument.cs (1)
717return SpecializedCollections.EmptyEnumerable<TextSpan>();
Venus\ContainedLanguage.cs (1)
174_diagnosticAnalyzerService.Reanalyze(this.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(this.ContainedDocument.Id));
Venus\ContainedLanguage.IVsContainedCode.cs (1)
56return SpecializedCollections.EmptyList<TextSpanAndCookie>();
Watson\FaultReporter.cs (2)
217return SpecializedCollections.EmptyList<string>(); 239return SpecializedCollections.EmptyList<string>();
Workspace\VisualStudioDocumentNavigationService.cs (1)
372generatedDocument, SpecializedCollections.SingletonEnumerable(textSpan), cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
ReferenceCodeLensProvider.cs (1)
295Entries = entries ?? SpecializedCollections.EmptyList<CodeLensDetailEntryDescriptor>(),
Microsoft.VisualStudio.LanguageServices.CSharp (8)
CodeModel\CSharpCodeModelService.cs (8)
280return SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 288_ => SpecializedCollections.EmptyEnumerable<SyntaxNode>(), 346return SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 355return SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 361return SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 367return SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 373return SpecializedCollections.EmptyEnumerable<SyntaxNode>(); 1468return SpecializedCollections.EmptyEnumerable<ParameterSyntax>();
Microsoft.VisualStudio.LanguageServices.Implementation (4)
CodeModel\AbstractCodeModelService.cs (2)
1134? SpecializedCollections.SingletonEnumerable(_lineAdjustmentFormattingRule) 1262return SpecializedCollections.EmptyList<string>();
CodeModel\Collections\BasesCollection.cs (1)
83return SpecializedCollections.SingletonEnumerable<ITypeSymbol>(symbol.BaseType);
SolutionExplorer\BaseItem.cs (1)
45public IEnumerable<string> Children => SpecializedCollections.EmptyEnumerable<string>();
Microsoft.VisualStudio.LanguageServices.UnitTests (20)
AnalyzerSupport\AnalyzerDependencyCheckerTests.vb (2)
28Return SpecializedCollections.SingletonEnumerable( 29New IgnorableAssemblyIdentityList(SpecializedCollections.SingletonEnumerable(mscorlib)))
Diagnostics\DiagnosticTableDataSourceTests.vb (2)
45AssertEx.SetEqual(table.Columns, manager.GetColumnsForSources(SpecializedCollections.SingletonEnumerable(source))) 762service.GetTestAccessor().WaitUntilCompletion(workspace, SpecializedCollections.SingletonEnumerable(analyzerService.CreateIncrementalAnalyzer(workspace)).WhereNotNull().ToImmutableArray())
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (4)
132SpecializedCollections.SingletonEnumerable(GetDiagnosticData(project.Id)))) 134source.AddNewErrors(project.Id, New HashSet(Of DiagnosticData)(SpecializedCollections.SingletonEnumerable(diagnostic)), map) 172SpecializedCollections.SingletonEnumerable(GetDiagnosticData(project.Id)))) 174source.AddNewErrors(project.Id, New HashSet(Of DiagnosticData)(SpecializedCollections.SingletonEnumerable(diagnostic)), map)
Snippets\SnippetCompletionProviderTests.vb (1)
136Return SpecializedCollections.SingletonEnumerable(New SnippetInfo("Shortcut", "Title", "Description", "Path"))
TaskList\TaskListTableDataSourceTests.vb (1)
37AssertEx.SetEqual(table.Columns, manager.GetColumnsForSources(SpecializedCollections.SingletonEnumerable(source)))
Venus\CSharpContainedLanguageSupportTests.vb (5)
844refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService), 871refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService), 889refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService), 907refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService), 940refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService),
Venus\VisualBasicContainedLanguageSupportTests.vb (5)
880refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService), 905refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService), 925refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService), 944refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService), 974refactorNotifyServices:=SpecializedCollections.EmptyEnumerable(Of IRefactorNotifyService),
Microsoft.VisualStudio.LanguageServices.VisualBasic (11)
CodeModel\VisualBasicCodeModelService.vb (10)
320Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 343Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 406Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 414Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 420Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 430Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 440Return SpecializedCollections.EmptyEnumerable(Of SyntaxNode)() 1170SpecializedCollections.EmptyEnumerable(Of ParameterSyntax)) 1182Return SpecializedCollections.EmptyEnumerable(Of ParameterSyntax)() 4011Return SpecializedCollections.EmptyList(Of String)()
Venus\ContainedLanguageStaticEventBinding.vb (1)
38Return SpecializedCollections.EmptyEnumerable(Of Tuple(Of String, String, String))()