19 references to SingletonEnumerable
Microsoft.CodeAnalysis.CSharp.Features (6)
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (2)
152var prefixParts = SpecializedCollections.SingletonEnumerable(new SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, null, "(")).ToTaggedText(); 153var suffixParts = SpecializedCollections.SingletonEnumerable(new SymbolDisplayPart(SymbolDisplayPartKind.Punctuation, null, ")")).ToTaggedText();
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (4)
156var codeBlocks = SpecializedCollections.SingletonEnumerable(t.EqualsValue).Concat(attributes); 193var codeBlocks = SpecializedCollections.SingletonEnumerable(decl.Initializer).Concat(attributes); 228var codeBlocks = SpecializedCollections.SingletonEnumerable(t.Initializer).Concat(attributes); 353SpecializedCollections.SingletonEnumerable(parameter.Default).Concat(GetAttributes(parameter.AttributeLists));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
27? SpecializedCollections.SingletonEnumerable(sourceCodeKind.Value)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CodeFixes\CodeFixServiceTests.cs (4)
52var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => workspace.Services.GetRequiredService<IErrorLoggerService>())); 344var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => new TestErrorLogger())); 735? SpecializedCollections.SingletonEnumerable(new Lazy<CodeFixProvider, CodeChangeProviderMetadata>(() => vsixFixer, new CodeChangeProviderMetadata(name: nameof(VsixCodeFixProvider), languages: LanguageNames.CSharp))) 742var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => workspace.Services.GetRequiredService<IErrorLoggerService>()));
Microsoft.CodeAnalysis.Features (3)
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
403: SpecializedCollections.SingletonEnumerable(argument);
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
52var spans = SpecializedCollections.SingletonEnumerable(span);
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (1)
35return GetDeclarationInfo(model, node, getSymbol, SpecializedCollections.SingletonEnumerable(executableCodeBlock), cancellationToken);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (1)
43var formattingChanges = Formatter.GetFormattedTextChanges(root, SpecializedCollections.SingletonEnumerable(formattingSpan), services, formattingOptions, cancellationToken);
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.cs (2)
38var operations = SpecializedCollections.SingletonEnumerable(rootOperation); 52var operations = SpecializedCollections.SingletonEnumerable(localFunctionOperation);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
155var operations = SpecializedCollections.SingletonEnumerable(basicBlock.BranchValue);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReadOnlyDictionaryExtensions.cs (1)
28case T s: return SpecializedCollections.SingletonEnumerable(s);