255 references to SingletonEnumerable
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (1)
AbstractUserDiagnosticTest.cs (1)
205var diagnosticsToFix = ImmutableDictionary.CreateRange(SpecializedCollections.SingletonEnumerable(KeyValuePairUtil.Create(document, diagnostics.ToImmutableArray())));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
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 (2)
Diagnostics\Suppression\SuppressionTests.cs (1)
461SpecializedCollections.SingletonEnumerable(suppressionProviderFactory));
ExtractClass\ExtractClassTests.cs (1)
47return SpecializedCollections.SingletonEnumerable(new CSharpExtractClassCodeRefactoringProvider(service));
Microsoft.CodeAnalysis.CSharp.Features (24)
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\NamedParameterCompletionProvider.cs (1)
270return SpecializedCollections.SingletonEnumerable(delegateType.DelegateInvokeMethod!.Parameters);
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
149SpecializedCollections.SingletonEnumerable(variableStatement));
CSharpDeclarationComputer.cs (4)
154var codeBlocks = SpecializedCollections.SingletonEnumerable(t.EqualsValue).Concat(attributes); 191var codeBlocks = SpecializedCollections.SingletonEnumerable(decl.Initializer).Concat(attributes); 226var codeBlocks = SpecializedCollections.SingletonEnumerable(t.Initializer).Concat(attributes); 351SpecializedCollections.SingletonEnumerable(parameter.Default).Concat(GetAttributes(parameter.AttributeLists));
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
559=> SpecializedCollections.SingletonEnumerable(lambdaBody);
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 (2)
106? SpecializedCollections.SingletonEnumerable(SyntaxFactory.ElasticMarker) 116? SpecializedCollections.SingletonEnumerable(SyntaxFactory.ElasticMarker)
ImplementInterface\CSharpImplementInterfaceService.cs (1)
62interfaceTypes = SpecializedCollections.SingletonEnumerable(interfaceType);
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (2)
153var prefixParts = SpecializedCollections.SingletonEnumerable(new SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, null, "(")).ToTaggedText(); 154var suffixParts = SpecializedCollections.SingletonEnumerable(new SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, null, ")")).ToTaggedText();
Microsoft.CodeAnalysis.CSharp.Workspaces (12)
CSharpSemanticFacts.cs (1)
257return SpecializedCollections.SingletonEnumerable(
CSharpTypeInferenceService.TypeInferrer.cs (6)
118return SpecializedCollections.SingletonEnumerable(typeInferenceInfo); 1658return SpecializedCollections.SingletonEnumerable( 2038? SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo(namedType.TypeArguments[0])) 2092? SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo(UnwrapTaskLike(type, isAsync))) 2312return SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo( 2434return SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo(Compilation.GetSpecialType(SpecialType.System_Boolean)));
Formatting\CSharpSyntaxFormattingService.cs (2)
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((
Rename\CSharpRenameRewriterLanguageService.cs (2)
481symbols = SpecializedCollections.SingletonEnumerable(symbolInfo.Symbol); 813AddSymbolSourceSpans(conflicts, SpecializedCollections.SingletonEnumerable(containingNamedType), reverseMappedLocations);
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 (10)
BracePairs\BracePairsTaggerProvider.cs (1)
75return SpecializedCollections.SingletonEnumerable(visibleSpanOpt.Value);
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (1)
91return SpecializedCollections.SingletonEnumerable(visibleSpanOpt.Value);
InlineHints\InlineHintsDataTaggerProvider.cs (1)
100return SpecializedCollections.SingletonEnumerable(visibleSpanOpt.Value);
InlineRename\InlineRenameSession.cs (1)
258_openTextBuffers[triggerSpan.Snapshot.TextBuffer].SetReferenceSpans(SpecializedCollections.SingletonEnumerable(startingSpan.ToTextSpan()));
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\ITextSnapshotExtensions.cs (1)
47var result = formatter.GetFormattingResult(documentSyntax.Root, SpecializedCollections.SingletonEnumerable(span), options, rules, cancellationToken);
Tagging\AbstractAsynchronousTaggerProvider.cs (1)
217return SpecializedCollections.SingletonEnumerable(subjectBuffer.CurrentSnapshot.GetFullSpan());
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
92: this.AccumulatedTextChanges.Accumulate(SpecializedCollections.SingletonEnumerable(textChangeRange));
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (1)
NavigableSymbolService.NavigableSymbol.cs (1)
45=> SpecializedCollections.SingletonEnumerable(PredefinedNavigableRelationships.Definition);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (3)
ChangeSignature\AbstractChangeSignatureTests.cs (1)
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 (4)
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
29? SpecializedCollections.SingletonEnumerable(sourceCodeKind.Value)
Threading\WpfFactDiscoverer.cs (2)
35return SpecializedCollections.SingletonEnumerable(testCase); 41return SpecializedCollections.SingletonEnumerable(testCase);
Workspaces\TestHostProject.cs (1)
215: this(workspace, name, language, compilationOptions, parseOptions, SpecializedCollections.SingletonEnumerable(document), SpecializedCollections.EmptyEnumerable<TestHostDocument>(), SpecializedCollections.EmptyEnumerable<TestHostDocument>(), projectReferences, metadataReferences, analyzerReferences, assemblyName, defaultNamespace)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (36)
CodeFixes\CodeFixServiceTests.cs (5)
53var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => workspace.Services.GetRequiredService<IErrorLoggerService>())); 335var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => new TestErrorLogger())); 378return SpecializedCollections.SingletonEnumerable( 691? SpecializedCollections.SingletonEnumerable(new Lazy<CodeFixProvider, CodeChangeProviderMetadata>(() => vsixFixer, new CodeChangeProviderMetadata(name: nameof(VsixCodeFixProvider), languages: LanguageNames.CSharp))) 699var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => workspace.Services.GetRequiredService<IErrorLoggerService>()));
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\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 (5)
Interactive\InteractiveWindowResetCommand.cs (1)
54=> SpecializedCollections.SingletonEnumerable(CommandName);
NavigableSymbols\NavigableSymbolService.NavigableSymbol.cs (1)
45=> SpecializedCollections.SingletonEnumerable(PredefinedNavigableRelationships.Definition);
Peek\DefinitionPeekableItem.cs (1)
44=> SpecializedCollections.SingletonEnumerable(PredefinedPeekRelationships.Definitions);
Peek\ExternalFilePeekableItem.cs (1)
31get { return SpecializedCollections.SingletonEnumerable(_relationship); }
WpfClassificationExtensions.cs (1)
103=> SpecializedCollections.SingletonEnumerable(part).ToTextBlock(formatMap, typeMap);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (5)
CodeDefinitionWindow\CrossLanguageCodeDefinitionWindowTests.vb (1)
90Return Task.FromResult(SpecializedCollections.SingletonEnumerable(Of INavigableItem)(New FakeNavigableItem(document)))
CodeFixes\CodeFixServiceTests.vb (2)
60Dim logger = SpecializedCollections.SingletonEnumerable(New Lazy(Of IErrorLoggerService)(Function() workspace.Services.GetService(Of IErrorLoggerService))) 139Dim logger = SpecializedCollections.SingletonEnumerable(New Lazy(Of IErrorLoggerService)(Function() workspace.Services.GetService(Of IErrorLoggerService)))
Diagnostics\DiagnosticProviderTests.vb (1)
300service.GetTestAccessor().WaitUntilCompletion(workspace, SpecializedCollections.SingletonEnumerable(analyzerService.CreateIncrementalAnalyzer(workspace)).WhereNotNull().ToImmutableArray())
IntelliSense\VisualBasicCompletionCommandHandlerTests.vb (1)
3481Return SpecializedCollections.SingletonEnumerable(New SnippetInfo("Shortcut", "Title", "Description", "Path"))
Microsoft.CodeAnalysis.Features (34)
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 (1)
47return SpecializedCollections.SingletonEnumerable<CodeActionOperation>(new ChangeSignatureCodeActionOperation(changeSignatureResult.UpdatedSolution, changeSignatureResult.ConfirmationMessage));
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
209SpecializedCollections.SingletonEnumerable((optionName, optionValue, isPerLanguage)),
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);
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(
ExtractMethod\InsertionPoint.cs (1)
23var newRoot = root.AddAnnotations(SpecializedCollections.SingletonEnumerable(Tuple.Create(node, annotation)));
ExtractMethod\OperationStatus.cs (1)
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);
GenerateMember\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
80SpecializedCollections.SingletonEnumerable(localStatement),
ImplementAbstractClass\ImplementAbstractClassData.cs (1)
67SpecializedCollections.SingletonEnumerable(abstractClassType),
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
681return SpecializedCollections.SingletonEnumerable(_expression);
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (2)
528SpecializedCollections.SingletonEnumerable(newIfBody), original: ifBody)); 555SpecializedCollections.SingletonEnumerable(newIfBody), ifBody));
MetadataAsSource\AbstractMetadataAsSourceService.cs (1)
74SpecializedCollections.SingletonEnumerable(node.FullSpan),
NamingStyleCodeFixProvider.cs (1)
155return SpecializedCollections.SingletonEnumerable(
Organizing\Organizers\AbstractSyntaxNodeOrganizer.cs (1)
19get { return SpecializedCollections.SingletonEnumerable(typeof(TSyntaxNode)); }
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
403: SpecializedCollections.SingletonEnumerable(argument);
Workspace\MiscellaneousFileUtilities.cs (1)
74documents: SpecializedCollections.SingletonEnumerable(documentInfo),
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Features\Diagnostics\DiagnosticAnalyzerService_IncrementalAnalyzer.cs (1)
48=> Reanalyze(e.Solution.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(e.NewActiveContextDocumentId), highPriority: true);
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
81? SpecializedCollections.SingletonEnumerable(DiagnosticData.Create(loadDiagnostic, textDocument))
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (1)
139var analyzerAndExistingData = SpecializedCollections.SingletonEnumerable((analyzer, existingData));
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateSet.cs (1)
82return SpecializedCollections.SingletonEnumerable(documentId.ProjectId);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (1)
88var documentIds = (DocumentId != null) ? SpecializedCollections.SingletonEnumerable(DocumentId) : project.DocumentIds;
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.Workspaces (1)
SolutionAssetStorage.Scope.cs (1)
98using var checksumPool = Creator.CreateChecksumSet(SpecializedCollections.SingletonEnumerable(checksum));
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
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 (28)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
738Return SpecializedCollections.SingletonEnumerable(Of AbstractFormattingRule)(New ChangeSignatureFormattingRule()).Concat(Formatter.GetDefaultFormattingRules(document))
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (2)
163Return SpecializedCollections.SingletonEnumerable( 187Return SpecializedCollections.SingletonEnumerable(delegateType.DelegateInvokeMethod.Parameters.As(Of ISymbol)())
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (1)
203Return SpecializedCollections.SingletonEnumerable(CreateCompletionItem(nameToken.ValueText, beforeCaretText:=nameToken.ValueText & ">", afterCaretText:=String.Empty))
ConvertIfToSwitch\VisualBasicConvertIfToSwitchCodeRefactoringProvider.Rewriting.vb (1)
32Return If(node.IsStatementContainerNode(), node.GetStatements(), SpecializedCollections.SingletonEnumerable(node))
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 (1)
87SpecializedCollections.SingletonEnumerable(Of SyntaxTrivia)(SyntaxFactory.ElasticMarker),
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
427SpecializedCollections.SingletonEnumerable(SyntaxFactory.ElasticCarriageReturnLineFeed)))
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)
SignatureHelp\AbstractIntrinsicOperatorSignatureHelpProvider.vb (1)
76documentationFactory:=Function(c) SpecializedCollections.SingletonEnumerable(New TaggedText(TextTags.Text, documentation.DocumentationText)),
SignatureHelp\AddRemoveHandlerSignatureHelpProvider.vb (2)
25Return ValueTaskFactory.FromResult(SpecializedCollections.SingletonEnumerable(Of AbstractIntrinsicOperatorDocumentation)(New AddHandlerStatementDocumentation())) 27Return ValueTaskFactory.FromResult(SpecializedCollections.SingletonEnumerable(Of AbstractIntrinsicOperatorDocumentation)(New RemoveHandlerStatementDocumentation()))
SignatureHelp\InvocationExpressionSignatureHelpProvider.DelegateInvoke.vb (1)
36Return SpecializedCollections.SingletonEnumerable(item)
SignatureHelp\PredefinedCastExpressionSignatureHelpProvider.vb (1)
27Return SpecializedCollections.SingletonEnumerable(New PredefinedCastExpressionDocumentation(node.Keyword.Kind, Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False)))
VisualBasicDeclarationComputer.vb (5)
91Dim codeBlocks = SpecializedCollections.SingletonEnumerable(Of SyntaxNode)(t.Initializer).Concat(attributes) 107Dim codeBlocks = SpecializedCollections.SingletonEnumerable(initializer).Concat(attributes) 157Dim codeBlocks = SpecializedCollections.SingletonEnumerable(Of SyntaxNode)(methodBlock). 190SpecializedCollections.SingletonEnumerable(initializer).Concat(codeBlocks), 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 (11)
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),
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)
SpecialFormattingOperation.vb (1)
217SpecializedCollections.SingletonEnumerable(baseToken.GetNextToken(includeZeroWidth:=True)),
SyntaxNodeExtensions.vb (1)
977Return SpecializedCollections.SingletonEnumerable(initializer.Value)
VisualBasicSemanticFacts.vb (1)
230Return SpecializedCollections.SingletonEnumerable(semanticModel.GetDeclaredSymbol(memberDeclaration, cancellationToken))
VisualBasicSmartTokenFormatter.vb (1)
40Dim spans = SpecializedCollections.SingletonEnumerable(TextSpan.FromBounds(previousToken.SpanStart, token.Span.End))
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 (36)
AbstractTriviaDataFactory.FormattedWhitespace.cs (1)
54=> SpecializedCollections.SingletonEnumerable<TextChange>(new TextChange(textSpan, _newString));
AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
89: SpecializedCollections.SingletonEnumerable(new TypeInferenceInfo(type));
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (1)
81var kvp = SpecializedCollections.SingletonEnumerable(KeyValuePairUtil.Create(project, diagnostics));
CodeRefactorings\FixAllOccurences\FixAllState.cs (1)
113documentsToFix = SpecializedCollections.SingletonEnumerable(Document);
Editing\ImportAdder.cs (1)
23return SpecializedCollections.SingletonEnumerable(root.FullSpan);
Formatting\Formatter.cs (11)
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);
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);
IReadOnlyDictionaryExtensions.cs (1)
27case T s: return SpecializedCollections.SingletonEnumerable(s);
ISyntaxFactsExtensions.cs (1)
386=> service.SpansPreprocessorDirective(SpecializedCollections.SingletonEnumerable(node));
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (2)
40return ImmutableDictionary.CreateRange(SpecializedCollections.SingletonEnumerable( 64return ImmutableDictionary.CreateRange(SpecializedCollections.SingletonEnumerable(
Rename\TokenRenameInfo.cs (1)
39symbols: SpecializedCollections.SingletonEnumerable(symbol)
Shared\Extensions\IFindReferencesResultExtensions.cs (1)
23? SpecializedCollections.SingletonEnumerable(definition.Locations.First())
Shared\Extensions\SyntaxGeneratorExtensions.cs (1)
196SpecializedCollections.SingletonEnumerable(throwStatement));
Simplification\Simplifier.cs (2)
211return ReduceAsync(document, SpecializedCollections.SingletonEnumerable(span), optionSet, cancellationToken); 216=> ReduceAsync(document, SpecializedCollections.SingletonEnumerable(span), options, cancellationToken);
SymbolUsageAnalysis.cs (2)
37var operations = SpecializedCollections.SingletonEnumerable(rootOperation); 51var operations = SpecializedCollections.SingletonEnumerable(localFunctionOperation);
SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
155var operations = SpecializedCollections.SingletonEnumerable(basicBlock.BranchValue);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
428SpecializedCollections.SingletonEnumerable(documentId));
Workspace\Solution\Solution.cs (4)
609SpecializedCollections.SingletonEnumerable( 717SpecializedCollections.SingletonEnumerable( 815SpecializedCollections.SingletonEnumerable( 915SpecializedCollections.SingletonEnumerable(
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
CodeCleanup\CodeCleanupTests.cs (4)
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());
Microsoft.VisualStudio.LanguageServices (10)
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);
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)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
791AddDocumentToFolder(project, info.Id, SpecializedCollections.SingletonEnumerable(AppCodeFolderName), info.Name, documentKind, initialText, info.FilePath);
TableDataSource\Suppression\VisualStudioDiagnosticListTableCommandHandler.cs (1)
221_diagnosticService.Reanalyze(_workspace, documentIds: SpecializedCollections.SingletonEnumerable(selectedDiagnostic.DocumentId), highPriority: true);
Venus\ContainedLanguage.cs (1)
174_diagnosticAnalyzerService.Reanalyze(this.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(this.ContainedDocument.Id));
Workspace\VisualStudioDocumentNavigationService.cs (1)
372generatedDocument, SpecializedCollections.SingletonEnumerable(textSpan), cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.Implementation (2)
CodeModel\AbstractCodeModelService.cs (1)
1134? SpecializedCollections.SingletonEnumerable(_lineAdjustmentFormattingRule)
CodeModel\Collections\BasesCollection.cs (1)
83return SpecializedCollections.SingletonEnumerable<ITypeSymbol>(symbol.BaseType);
Microsoft.VisualStudio.LanguageServices.UnitTests (10)
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)))