459 references to Select
Aspire.Hosting (2)
ApplicationModel\ResourceNotificationService.cs (2)
383newState.ExitCode, string.Join(", ", newState.EnvironmentVariables.Select(e => $"{e.Name} = {e.Value}")), string.Join(", ", newState.Urls.Select(u => $"{u.Name} = {u.Url}")),
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.cs (1)
82.Select(ps => (Symbol: ps, ModelTypes: GetModelNameAttributes(ps)))
ConfigurationSchemaGenerator (2)
ConfigSchemaGenerator.cs (2)
82(exclusionPaths ??= new()).AddRange(exclusionPathsArg.Values.Select(v => $"{path}:{(string)v.Value}")); 93(logCategories ??= new()).AddRange(args[0].Values.Select(v => (string)v.Value));
ILLink.CodeFixProvider (4)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
64 public sealed override ImmutableArray<string> FixableDiagnosticIds => SupportedDiagnostics.Select (dd => dd.Id).ToImmutableArray ();
RequiresAssemblyFilesCodeFixProvider.cs (1)
25 public sealed override ImmutableArray<string> FixableDiagnosticIds => SupportedDiagnostics.Select (dd => dd.Id).ToImmutableArray ();
RequiresDynamicCodeCodeFixProvider.cs (1)
22 public sealed override ImmutableArray<string> FixableDiagnosticIds => SupportedDiagnostics.Select (dd => dd.Id).ToImmutableArray ();
RequiresUnreferencedCodeCodeFixProvider.cs (1)
22 public sealed override ImmutableArray<string> FixableDiagnosticIds => SupportedDiagnostics.Select (dd => dd.Id).ToImmutableArray ();
ILLink.RoslynAnalyzer (1)
TrimAnalysis\TrimAnalysisVisitor.cs (1)
110 var elements = operation.Initializer?.ElementValues.Select (val => Visit (val, state)).ToArray () ?? System.Array.Empty<MultiValue> ();
Microsoft.Analyzers.Local (1)
ApiLifecycle\AssemblyAnalysis.cs (1)
141var baseTypes = new HashSet<string>(type.AllInterfaces.Select(x => x.ToDisplayString(_shortSymbolNameFormat)));
Microsoft.AspNetCore.Analyzer.Testing (1)
CodeFixRunner.cs (1)
56diagnostics.Select(d => CSharpDiagnosticFormatter.Instance.Format(d, CultureInfo.InvariantCulture)));
Microsoft.AspNetCore.App.Analyzers (3)
RouteEmbeddedLanguage\Infrastructure\EmbeddedLanguageCommentDetector.cs (1)
28var namePortion = string.Join("|", identifiers.Select(n => $"({Regex.Escape(n)})"));
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
71var routeParameterNames = new HashSet<string>(routeUsage.RoutePattern.RouteParameters.Select(p => p.Name), StringComparer.OrdinalIgnoreCase);
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
223var parameterTypes = constructor.Parameters.Select(parameter => $"typeof({parameter.Type.ToDisplayString()})");
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
223var parameterTypes = constructor.Parameters.Select(parameter => $"typeof({parameter.Type.ToDisplayString()})");
Microsoft.Build (3)
Definition\Project.cs (2)
2627ImmutableArray<string> includeGlobStrings = includeGlobFragments.Select(f => f.TextFragment).ToImmutableArray(); 2628var includeGlob = CompositeGlob.Create(includeGlobFragments.Select(f => f.ToMSBuildGlob()));
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
160DecorateItemsWithMetadata(items.Select(i => new ItemBatchingContext(i)), _metadata);
Microsoft.CodeAnalysis (12)
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (1)
127string.Join(", ", lockedBy.Select(info => $"'{info.applicationName}' ({info.processId})")));
CommandLine\CommonCompiler.cs (3)
433var embeddedFileOrderedSet = new OrderedSet<string>(Arguments.EmbeddedFiles.Select(e => e.Path)); 500var set = new HashSet<string>(arguments.EmbeddedFiles.Select(f => f.Path)); 501set.IntersectWith(arguments.SourceFiles.Select(f => f.Path));
CommandLine\ReportAnalyzerUtil.cs (2)
108DiagnosticSuppressor suppressor => suppressor.SupportedSuppressions.Select(s => s.Id), 109_ => analyzer.SupportedDiagnostics.Select(d => d.Id),
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActions.cs (2)
69var inputAnalyzers = groupedAnalyzerActions.GroupedActionsByAnalyzer.Select(a => a.analyzer); 70var myAnalyzers = GroupedActionsByAnalyzer.Select(a => a.analyzer);
SourceGeneration\GeneratorDriver.cs (3)
76trees.AddRange(generatorState.PostInitTrees.Select(t => t.Tree)); 77trees.AddRange(generatorState.GeneratedTrees.Select(t => t.Tree)); 296constantSourcesBuilder.AddRange(generatorState.PostInitTrees.Select(t => t.Tree));
SourceGeneration\RunResults.cs (1)
69ImmutableInterlocked.InterlockedInitialize(ref _lazyGeneratedTrees, Results.Where(r => !r.GeneratedSources.IsDefaultOrEmpty).SelectMany(r => r.GeneratedSources.Select(g => g.SyntaxTree)).ToImmutableArray());
Microsoft.CodeAnalysis.CodeStyle (16)
src\Analyzers\Core\Analyzers\AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs (2)
106AddDescriptorsToFadingOptionMapping(supportedDiagnosticsWithOptions.Select(static item => item.Descriptor), fadingOption); 115AddDescriptorsToFadingOptionMapping(supportedDiagnosticsWithOptions.Select(static item => item.Descriptor), fadingOption);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
618foreach (var tree in namedTypeSymbol.Locations.Select(l => l.SourceTree).Distinct().WhereNotNull())
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
190if (!namedType.DeclaringSyntaxReferences.Select(d => d.SyntaxTree).Distinct().Any(tree =>
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
178nodes = nodes.AddRange(matches.Select(static m => m.Node));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (1)
44.Select(section => (matchKind: section.GetMatchKind(language), section))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
605var declarationSyntax = symbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).FirstOrDefault();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeParameterSymbolExtensions.cs (1)
13=> typeParameter.ConstraintTypes.Select(GetNamedTypeSymbol).WhereNotNull().FirstOrDefault();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
108symbols.AddRange(interfaceType.AllInterfaces.Select(i => i.OriginalDefinition));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
86var substitutedArguments = symbol.TypeArguments.Select(t => t.Accept(this));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
307return string.Join(", ", symbols.Select(symbol => symbol.ToEditorConfigString())); 405return string.Join(", ", accessibilities.Select(accessibility => accessibility.ToEditorConfigString(languageName))); 464return string.Join(", ", modifiers.Select(modifier => modifier.ToEditorConfigString(languageName)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (2)
351new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 352new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (1)
99selectedMembers.AddRange(GetDeclaratorsAndIdentifiers(member).Select(pair => pair.declarator));
Microsoft.CodeAnalysis.CodeStyle.Fixes (20)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
365var parameters = methodToUpdate.Parameters.Select(p => p.ToDisplayString(SimpleFormat)); 440methodParameterNames.AddRange(method.Parameters.Select(p => p.Name));
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
232var uniqueName = NameGenerator.EnsureUniqueness(argumentNameSuggestion, method.Parameters.Select(p => p.Name));
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
169[.. delegatedConstructor.Parameters.Select(p => p.Name)], 175if (delegatedConstructor.Parameters.Select(p => p.Name).Intersect(remainingParameterNames.Select(n => n.BestNameForParameter)).Any()) 229constructor.Parameters.Select(p => p.Type).SequenceEqual(ParameterTypes))
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
55string.Join(", ", constructor.Parameters.Select(p => p.Name))),
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
45_constructors.Select(CreateConstructorDefinition),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
134.Select(p => p.BestNameForParameter) 210var types = await SpecializedTasks.WhenAll(DetermineParameterTypes(cancellationToken).Select(t => FixTypeAsync(t, cancellationToken))).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
846var spansToFormat = originalDeclStatementsToMoveOrRemove.Select(s => s.Span);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
92return this.GetMembers().Select(m => m.Name).ToList();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
196var diagnostics = string.Join(", ", errors.Select(d => d.ToString()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
47if (method.TypeParameters.Select(t => t.Name).SequenceEqual(newNames)) 81if (parameterList.Select(p => p.Name).SequenceEqual(parameterNames))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (1)
18if (parameterList.Select(p => p.Name).SequenceEqual(parameterNames))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
159IEnumerable<(TType instance, (TNode semanticNode, IEnumerable<TNode> additionalNodes) nodes)> originalNodePairs = originalNodes.Select(n => (n, selector(n)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (2)
87.Select(t => t.InferredType) 99.Select(info => info.InferredType)
Microsoft.CodeAnalysis.CSharp (25)
Binder\Binder_InterpolatedString.cs (2)
669Debug.Assert(appendCallsArray.Select(a => a.Length).SequenceEqual(partsArray.Select(a => a.Length)));
Binder\Binder_Statements.cs (1)
3876containerNode = containingType.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).OfType<TypeDeclarationSyntax>().First();
Binder\DecisionDagBuilder.cs (3)
1716var bindings = cd.Bindings.Select(bpb => $"{(bpb.VariableAccess is BoundLocal l ? l.LocalSymbol.Name : "<var>")}={tempName(bpb.TempContainingValue)}"); 2454return $"AND({string.Join(", ", RemainingTests.Select(t => t.Dump(dump)))})"; 2508return $"OR({string.Join(", ", RemainingTests.Select(t => t.Dump(dump)))})";
Binder\Imports.cs (3)
54Usings.Select(u => u.NamespaceOrType.ToString())).Concat( 55ExternAliases.Select(ea => $"extern alias {ea.Alias.Name}"))); 205replacedExternAliases.AddAll(externs2.Select(e => e.Alias.Name));
BoundTree\LengthBasedStringSwitchData.cs (1)
266builder.AppendLine($"Buckets: {string.Join(", ", StringBasedJumpTables.Select(t => t.StringCaseLabels.Length))}");
Compilation\CSharpCompilation.cs (1)
1589uniqueUsings.AddAll(usingsFromoptions.UsingNamespacesOrTypes.Select(static unt => unt.NamespaceOrType));
Emitter\Model\PEModuleBuilder.cs (1)
2063.Select(type => type.GetCciAdapter())
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.ValueDispatchNode.cs (1)
45public override string ToString() => "[" + string.Join(",", Cases.Select(c => c.value)) + "]";
Symbols\NativeIntegerTypeSymbol.cs (1)
52public override IEnumerable<string> MemberNames => GetMembers().Select(m => m.Name);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
1270return (IsTupleType || IsRecord || IsRecordStruct) ? GetMembers().Select(m => m.Name) : this.declaration.MemberNames;
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (2)
326uniqueUsings.AddAll(namespacesOrTypes.Select(n => n.NamespaceOrType)); 868uniqueUsings.AddAll(globalUsingNamespacesOrTypes.Select(n => n.NamespaceOrType));
Symbols\SubstitutedNamedTypeSymbol.cs (2)
193return new List<string>(GetTypeMembersUnordered().Select(s => s.Name).Distinct()); 198return GetMembers().Select(s => s.Name).Distinct();
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
130public override IEnumerable<string> MemberNames => GetMembers().Select(m => m.Name);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
807public override IEnumerable<string> MemberNames => GetMembers().Select(m => m.Name);
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
68public override IEnumerable<string> MemberNames => Constructors.Select(m => m.Name);
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
65=> _members.Select(static m => m.Name);
Symbols\TypedConstantExtensions.cs (1)
27return "{" + string.Join(", ", constant.Values.Select(v => v.ToCSharpString())) + "}";
Utilities\ValueSetFactory.NumericValueSet.cs (1)
317return string.Join(",", this._intervals.Select(p => $"[{_tc.ToString(p.first)}..{_tc.ToString(p.last)}]"));
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
57.Select(declaringSyntaxReferences => declaringSyntaxReferences.GetSyntax())
src\Analyzers\CSharp\Analyzers\RemoveUnusedMembers\CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
29.Select(r => r.GetSyntax(cancellationToken))
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
208.Select(s => s.Name)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
176defaultValue: new CodeStyleOption2<string>(string.Join(",", s_preferredModifierOrderDefault.Select(SyntaxFacts.GetText)), NotificationOption2.Silent));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
95var enumDecl = namedTypeSymbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).OfType<EnumDeclarationSyntax>().FirstOrDefault();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (3)
174.SequenceEqual(propertiesToAssign.Select(property => property.Type))) 183.Select(expression => 192ArgumentList([.. expressions.Select(Argument)])));
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
48resultBuilder.AddRange(inheritedProperties.Select(property => new PositionalParameterInfo(
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
77.Select(d => root.FindNode(d.Location.SourceSpan).AncestorsAndSelf().OfType<LocalFunctionStatementSyntax>().FirstOrDefault())
src\Analyzers\CSharp\CodeFixes\UseDeconstruction\CSharpUseDeconstructionCodeFixProvider.cs (1)
162[.. tupleType.TupleElements.Select(
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
247: ParameterList([.. delegateMethod.Parameters.Select(parameter =>
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
112compilationUnit.Members.ReplaceRange((GlobalStatementSyntax)usingStatement.GetRequiredParent(), expandedUsingStatements.Select(GlobalStatement))),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (1)
105=> ArgumentList([.. arguments.Select(ArgumentGenerator.GenerateArgument)]);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
43[.. typedConstant.Values.Select(v => GenerateExpression(v))]));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\TypeParameterGenerator.cs (1)
24[.. typeParameters.Select(t => GenerateTypeParameter(t, info))]);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
50diagnostics.Select(d => (d.Descriptor.Id, d.Severity)));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (14)
CommandLineTests.cs (14)
510string[] resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 511string[] references = args.MetadataReferences.Select(r => r.Reference).ToArray(); 606string[] resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 715resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 720resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 725resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 1239parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 1244parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 2335parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2341parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2347parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2353parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2359parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2365parsedArgs.EmbeddedFiles.Select(f => f.Path));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
209var reservedNames = semanticModel.LookupSymbols(plusEqualsToken.SpanStart).Select(m => m.Name);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (1)
186[.. info.RelatedSpans.Select(actualSpan => new Action<TextSpan>(expectedSpan => Assert.Equal(expectedSpan, actualSpan)))]);
QuickInfo\SemanticQuickInfoSourceTests.cs (1)
8370item.Sections.First(section => section.Kind == QuickInfoSectionKinds.DocumentationComments).TaggedParts.Select(p => p.Tag).ToArray(),
SymbolKey\SymbolKeyTestBase.cs (1)
128foreach (var node in symbol.DeclaringSyntaxReferences.Select(d => d.GetSyntax()))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenTupleTest.cs (2)
6041Assert.All(tuple8WithoutNames.TupleElements.Select(f => f.Locations.FirstOrDefault()), 13878AssertEx.Equal(baseLine, symbols.Select(s => s.ToTestDisplayString()));
Emit\CompilationEmitTests.cs (2)
659peReader.PEHeaders.SectionHeaders.Select(h => h.Name)); 2624AssertEx.Equal(expected, entries.Select(e => e.Type));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
74AssertEx.Equal(new[] { DebugDirectoryEntryType.CodeView, DebugDirectoryEntryType.PdbChecksum, DebugDirectoryEntryType.Reproducible, DebugDirectoryEntryType.EmbeddedPortablePdb }, entries.Select(e => e.Type));
PDB\PortablePdbTests.cs (2)
177AssertEx.Equal(new[] { DebugDirectoryEntryType.CodeView, DebugDirectoryEntryType.PdbChecksum, DebugDirectoryEntryType.EmbeddedPortablePdb }, entries.Select(e => e.Type)); 237AssertEx.Equal(new[] { DebugDirectoryEntryType.CodeView, DebugDirectoryEntryType.PdbChecksum, DebugDirectoryEntryType.Reproducible, DebugDirectoryEntryType.EmbeddedPortablePdb }, entries.Select(e => e.Type));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Attributes\AttributeTests.cs (1)
655Assert.Equal(new object[] { 1, 2, 3 }, attributeData.ConstructorArguments.Single().Values.Select(arg => arg.Value));
FlowAnalysis\FlowTests.cs (1)
5842var property = declarations.Select(d => model.GetDeclaredSymbol(d)).Where(p => p.ContainingSymbol.Name == "Program").Single();
FlowAnalysis\RegionAnalysisTests.cs (2)
1372string.Join(", ", new string[] { "f" }.Concat((results2.ReadOutside).Select(symbol => symbol.Name)).OrderBy(name => name))); 1376string.Join(", ", new string[] { "f" }.Concat((results2.WrittenOutside).Select(symbol => symbol.Name)).OrderBy(name => name)));
Microsoft.CodeAnalysis.CSharp.Features (22)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
318reservedNames: declaredSymbol.ContainingType.GetMembers().Select(m => m.Name));
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (1)
202=> existingNamedParameters.Except(parameterList.Select(p => p.Name)).IsEmpty();
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
139return existingNamedParameters.Except(parameterList.Select(p => p.Name)).IsEmpty();
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
84var declarations = method.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).OfType<MethodDeclarationSyntax>();
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
36[.. sections.Select(section => AsSwitchExpressionArmSyntax(section, feature))]));
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
203c => c.DeclaringSyntaxReferences.Select(d => d.GetSyntax()).OfType<ConstructorDeclarationSyntax>());
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
339_statementsOrMemberOrAccessorToInsert.Select(s => global ? SyntaxFactory.GlobalStatement((StatementSyntax)s) : (MemberDeclarationSyntax)s));
SignatureHelp\AbstractOrdinaryMethodSignatureHelpProvider.cs (1)
43[.. method.Parameters.Select(p => Convert(p, semanticModel, position, documentationCommentFormattingService))],
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (1)
148[.. constructor.Parameters.Select(p => Convert(p, semanticModel, position, documentationCommentFormattingService))]);
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (1)
236[.. indexer.Parameters.Select(p => Convert(p, semanticModel, position, documentationCommentFormattingService))]);
SignatureHelp\GenericNameSignatureHelpProvider.cs (2)
188[.. namedType.TypeParameters.Select(p => Convert(p, semanticModel, position, documentationCommentFormattingService))]); 201[.. method.TypeParameters.Select(p => Convert(p, semanticModel, position, documentationCommentFormattingService))]);
SignatureHelp\PrimaryConstructorBaseTypeSignatureHelpProvider.cs (1)
136[.. constructor.Parameters.Select(p => Convert(p, semanticModel, position, documentationCommentFormattingService))]);
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
57.Select(declaringSyntaxReferences => declaringSyntaxReferences.GetSyntax())
src\Analyzers\CSharp\Analyzers\RemoveUnusedMembers\CSharpRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
29.Select(r => r.GetSyntax(cancellationToken))
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
208.Select(s => s.Name)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (3)
174.SequenceEqual(propertiesToAssign.Select(property => property.Type))) 183.Select(expression => 192ArgumentList([.. expressions.Select(Argument)])));
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
48resultBuilder.AddRange(inheritedProperties.Select(property => new PositionalParameterInfo(
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
77.Select(d => root.FindNode(d.Location.SourceSpan).AncestorsAndSelf().OfType<LocalFunctionStatementSyntax>().FirstOrDefault())
src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
112compilationUnit.Members.ReplaceRange((GlobalStatementSyntax)usingStatement.GetRequiredParent(), expandedUsingStatements.Select(GlobalStatement))),
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
ExtractClass\ExtractClassTests.cs (1)
3127selections = selectedMembers.Select(m => (m, makeAbstract: false));
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
50diagnostics.Select(d => (d.Descriptor.Id, d.Severity)));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (4)
CommandLineRunnerTests.cs (1)
692}, arguments.MetadataReferences.Select(r => r.Reference));
ScriptTests.cs (3)
403AssertEx.Equal(new[] { "a", "b", "a", "x", "X" }, state.Variables.Select(v => v.Name)); 404AssertEx.Equal(new object[] { '1', 2u, 3m, 5m, 20 }, state.Variables.Select(v => v.Value)); 405AssertEx.Equal(new Type[] { typeof(char), typeof(uint), typeof(decimal), typeof(decimal), typeof(int) }, state.Variables.Select(v => v.Type));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\NameOfTests.cs (1)
1083symbols.Select(s => s.GetPublicSymbol()),
SourceGeneration\GeneratorDriverTests.cs (3)
2124invokedMethods.Select(m => $"// {m}"))); 2335driver.GetRunResult().Results.Single().TrackedSteps["Select"].Select(r => r.Outputs.Single())); 2356driver.GetRunResult().Results.Single().TrackedSteps["Select"].Select(r => r.Outputs.Single()));
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (1)
1294Assert.Equal(expectedGeneratedSources, driver.GetRunResult().Results.Single().GeneratedSources.Select(s => (s.HintName, s.SourceText.ToString())));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
DocumentationComments\CrefTests.cs (1)
2018AssertEx.SetEqual(info.CandidateSymbols.Select(sym => sym.ContainingAssembly.Name), "Lib1", "Lib2");
SymbolDisplay\SymbolDisplayTests.cs (1)
3632AssertEx.Equal(expectedKinds, actualParts.Select(p => p.Kind), itemInspector: p => $" SymbolDisplayPartKind.{p}");
Symbols\ExtensionMethodTests.cs (1)
3784var symbols = model.LookupSymbols(member.Expression.EndPosition, type, includeReducedExtensionMethods: true).Select(s => s.Name).ToArray();
Symbols\Source\DeclaringSyntaxNodeTests.cs (2)
39foreach (var node in declaringReferences.Select(d => d.GetSyntax())) 102foreach (var node in declaringReferences.Select(d => d.GetSyntax()))
Microsoft.CodeAnalysis.CSharp.Test.Utilities (9)
CompilationTestUtils.cs (2)
63AssertEx.SetEqual(symbols.Select(s => s.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)), descriptions); 350return symbols.Select(s => s.Name).Distinct().ToList();
CSharpTestBase.cs (3)
1801return attributes.Select(a => a.AttributeClass.Name); 1806return attributes.Select(a => a.AttributeClass.Name); 1811return attributes.Select(a => a.ToString());
Extensions.cs (2)
874return type.TypeArguments.Select(t => t.NullableAnnotation); 879return method.TypeArguments.Select(t => t.NullableAnnotation);
FunctionPointerUtilities.cs (2)
198AssertEx.Equal(expectedSymbolCandidates, semanticInfo.MemberGroup.Select(s => s.ToTestDisplayString(includeNonNullable: false))); 226AssertEx.Equal(expectedSymbolCandidates, semanticInfo.CandidateSymbols.Select(s => s.ToTestDisplayString(includeNonNullable: false)));
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Rename\CSharpRenameRewriterLanguageService.cs (1)
845conflicts.AddRange(DeclarationConflictHelpers.GetMembersWithConflictingSignatures((IMethodSymbol)renamedSymbol, trimOptionalParameters: false).Select(t => reverseMappedLocations[t]));
Simplification\CSharpSimplificationService.Expander.cs (1)
753[.. typeArguments.Select(p => ParseTypeName(p.ToDisplayString(s_typeNameFormatWithGenerics)))]))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
176defaultValue: new CodeStyleOption2<string>(string.Join(",", s_preferredModifierOrderDefault.Select(SyntaxFacts.GetText)), NotificationOption2.Silent));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
95var enumDecl = namedTypeSymbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).OfType<EnumDeclarationSyntax>().FirstOrDefault();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (1)
105=> ArgumentList([.. arguments.Select(ArgumentGenerator.GenerateArgument)]);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
43[.. typedConstant.Values.Select(v => GenerateExpression(v))]));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\TypeParameterGenerator.cs (1)
24[.. typeParameters.Select(t => GenerateTypeParameter(t, info))]);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (13)
CodeGeneration\SyntaxGeneratorTests.cs (13)
3787var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 3788var declX = Generator.GetDeclaration(symbolX.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 3789var declY = Generator.GetDeclaration(symbolY.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 3790var declZ = Generator.GetDeclaration(symbolZ.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 3964var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 3982var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 4003var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 4021var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 4039var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 4057var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 4075var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 4093var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First()); 4111var declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(x => x.GetSyntax()).First());
Microsoft.CodeAnalysis.EditorFeatures (2)
EditAndContinue\ActiveStatementTrackingService.cs (1)
203solution = solution.WithUpToDateSourceGeneratorDocuments(openDocumentIds.Select(static d => d.ProjectId));
InlineRename\AbstractEditorInlineRenameService.InlineRenameReplacementInfo.cs (1)
61.Select(s => new InlineRenameReplacement(InlineRenameReplacementKind.Complexified, s.oldSpan, s.newSpan));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
293item.CommitCharacters = [.. commitCharacters.Value.Select(c => c.ToString())];
QuickInfo\AbstractSemanticQuickInfoSourceTests.cs (1)
67var actualText = string.Concat(taggedText.Select(tt => tt.Text));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CodeFixes\CodeFixServiceTests.cs (1)
1104Assert.Equal(analyzer.SupportedDiagnostics.Select(d => d.Id), lowPriorityAnalyzerData.SupportedDiagnosticIds);
InheritanceMargin\InheritanceMarginTests.cs (1)
131.Select(info => TestInheritanceTargetItem.Create(info, testWorkspace))
Snippets\RoslynLSPSnippetConvertTests.cs (1)
510var placeholders = spans.Select(span => span.Start).ToImmutableArray();
SuggestedActions\SuggestedActionSourceProviderTests.cs (1)
23AssertEx.SetEqual(attributes.Select(a => a.Priority), SuggestedActionsSourceProvider.Orderings);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Interactive\ResetInteractive.cs (1)
113var importReferencesCommand = referencePaths.Select(_createReference);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.cs (1)
92HoistedLocalScopeRecords.Select(record => new ILSpan((uint)record.StartOffset, (uint)(record.StartOffset + record.Length))));
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
FunctionResolverTestBase.cs (1)
30var actualSignatures = request.GetResolvedAddresses().Select(a => GetMethodSignature(a.Module, a.Token));
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Internal\NavigateTo\FSharpNavigateToSearchService.cs (1)
59Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
Microsoft.CodeAnalysis.Features (63)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (1)
120!parameterNamesForSelectedMembers.Except(constructorParams.Select(p => p.Name)).Any();
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
110.Select(data => data.AttributeClass)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (1)
100var bannerText = banner.Select(trivia => trivia.ToFullString()).Join(string.Empty);
AddImport\SymbolReferenceFinder.cs (1)
203attributeSymbols.Select(r => r.WithDesiredName(r.DesiredName.GetWithoutAttributeSuffix(isCaseSensitive: false))));
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
140codeStyleOptionValues.Select(t => (t.optionName, t.currentOptionValue, t.isPerLanguage)),
Completion\CompletionDescription.cs (1)
68Interlocked.CompareExchange(ref _text, string.Concat(TaggedParts.Select(p => p.Text)), null);
Completion\Providers\AbstractDocCommentCompletionProvider.cs (10)
145var items = s_nestedTagNames.Select(GetItem); 155items = items.Concat(GetKeywordNames().Select(CreateLangwordCompletionItem)); 163var names = GetParameters(symbol).Select(p => p.Name); 188.Select(parameter => CreateCompletionItem(parameter.Name)); 203return GetKeywordNames().Select(CreateCompletionItem); 207return s_listTypeValues.Select(CreateCompletionItem); 221items.AddRange(s_topLevelRepeatableTagNames.Select(GetItem)); 256=> s_listTagNames.Select(GetItem); 259=> s_listHeaderTagNames.Select(GetItem); 263var names = symbols.Select(p => p.Name).ToSet();
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (1)
106.Select(reference => reference.GetSyntax())
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
71var declarationSyntax = symbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).SingleOrDefault();
Completion\Providers\ImportCompletionProvider\AbstractExtensionMethodImportCompletionProvider.cs (1)
92receiverTypeSymbol = errorTypeSymbol.CandidateSymbols.Select(GetSymbolType).FirstOrDefault(s => s != null);
Completion\Providers\SymbolCompletionItem.cs (1)
112return string.Join("|", symbols.Select(EncodeSymbol));
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (2)
235classSymbol.TypeParameters.Select(tp => g.IdentifierName(tp.Name))); 254properties.Select(p => p.Type)
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
272var knownCollectionInterfaces = s_KnownInterfaceNames.Select(
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
44: CreateSwitchStatement(ifStatement, target, sections.Select(section => AsSwitchSectionSyntax(section, generator, feature)));
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
286tupleType.TupleElements.Select(p => p.Type) 415: (TNameSyntax)generator.GenericName(structNameToken, typeParameters.Select(tp => generator.IdentifierName(tp.Name)));
EditAndContinue\TraceLog.cs (1)
73=> (!Tokens.IsDefault) ? string.Join(",", Tokens.Select(token => token.ToString("X8"))) :
EmbeddedLanguages\EmbeddedLanguageCommentDetector.cs (1)
27var namePortion = string.Join("|", identifiers.Select(n => $"({Regex.Escape(n)})"));
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
238linkedProjectIds.AddRange(linkedDocumentIds.Select(d => d.ProjectId));
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (1)
61Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
ExtractMethod\MethodExtractor.CodeGenerator.cs (1)
288(TExpressionSyntax)generator.TupleExpression(expressions.Select(generator.Argument));
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
147result.AddRange(implementations.Select(s => s.OriginalDefinition));
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (4)
61var mappedMembers = selectedMembers.Select(m => TryMapToWritableInstanceFieldOrProperty(service, m, cancellationToken)).Distinct().ToImmutableArray(); 108let constructorTypes = c.Parameters.Select(p => p.Type) 120=> parameters.Select(p => p.Type).SequenceEqual(constructor.Parameters.Select(p => p.Type));
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
338.Select(parameterAndName => (parameter: (ISymbol)parameterAndName.parameter,
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
722return symbolGroup.Select(s => s.OriginalDefinition)
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (2)
57.Select(symbol => symbol.Locations.FirstOrDefault()) 203.Select(node => root.GetCurrentNode(node))
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
72Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
NavigateTo\AbstractNavigateToSearchService.GeneratedDocumentSearch.cs (1)
33Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (2)
80Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1); 123using var _ = GetPooledHashSet(priorityDocuments.Select(d => d.Project), out var highPriProjects);
QuickInfo\QuickInfoSection.cs (1)
57Interlocked.CompareExchange(ref _text, string.Concat(TaggedParts.Select(t => t.Text)), null);
Shared\Extensions\ISymbolExtensions_Sorting.cs (1)
135return [.. GetMethodOrIndexerOrEventParameters(symbol).Select(p => p.Type.ToMinimalDisplayString(semanticModel, position))];
src\Analyzers\Core\Analyzers\AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs (2)
106AddDescriptorsToFadingOptionMapping(supportedDiagnosticsWithOptions.Select(static item => item.Descriptor), fadingOption); 115AddDescriptorsToFadingOptionMapping(supportedDiagnosticsWithOptions.Select(static item => item.Descriptor), fadingOption);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
618foreach (var tree in namedTypeSymbol.Locations.Select(l => l.SourceTree).Distinct().WhereNotNull())
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
190if (!namedType.DeclaringSyntaxReferences.Select(d => d.SyntaxTree).Distinct().Any(tree =>
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
178nodes = nodes.AddRange(matches.Select(static m => m.Node));
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
365var parameters = methodToUpdate.Parameters.Select(p => p.ToDisplayString(SimpleFormat)); 440methodParameterNames.AddRange(method.Parameters.Select(p => p.Name));
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
232var uniqueName = NameGenerator.EnsureUniqueness(argumentNameSuggestion, method.Parameters.Select(p => p.Name));
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (3)
169[.. delegatedConstructor.Parameters.Select(p => p.Name)], 175if (delegatedConstructor.Parameters.Select(p => p.Name).Intersect(remainingParameterNames.Select(n => n.BestNameForParameter)).Any()) 229constructor.Parameters.Select(p => p.Type).SequenceEqual(ParameterTypes))
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
55string.Join(", ", constructor.Parameters.Select(p => p.Name))),
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
45_constructors.Select(CreateConstructorDefinition),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
210var types = await SpecializedTasks.WhenAll(DetermineParameterTypes(cancellationToken).Select(t => FixTypeAsync(t, cancellationToken))).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
45Debug.Assert(diagnostics.Select(diagnostic => diagnostic.Properties[MatchFolderAndNamespaceConstants.TargetNamespace]).Distinct().Count() == 1);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
846var spansToFormat = originalDeclStatementsToMoveOrRemove.Select(s => s.Span);
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
62.Select(projectReference => EnhanceReference(projectAssets, projectReference, autoReferences, targetLibraryKeys, builtReferences))
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
219=> actual.Select(InspectDiagnostic);
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\LanguageServerProjectSystem.cs (1)
134_projectsToLoadAndReload.AddWork(projectFilePaths.Select(p => new ProjectToLoad(p, ProjectGuid: null, ReportTelemetry: true)));
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Extensions\Extensions.cs (1)
178var additionalDocuments = documentIds.Select(solution.GetAdditionalDocument).WhereNotNull().ToImmutableArray();
Extensions\ProtocolConversions.cs (1)
404var mappedResults = await GetMappedSpanResultAsync(oldDocument, [.. textChanges.Select(tc => tc.Span)], cancellationToken).ConfigureAwait(false);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (2)
86return analyzers.Select(s => s.Analyzer); 90=> $"project: ({project.Id}), ({string.Join(Environment.NewLine, stateSets.Select(s => s.Analyzer.ToString()))})";
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (1)
133var ideAnalyzers = stateSets.Select(s => s.Analyzer).Where(a => a is ProjectDiagnosticAnalyzer or DocumentDiagnosticAnalyzer).ToImmutableArrayOrEmpty();
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
465=> [.. refactorings.Select(r => FilterOnAnyThread(r, selection, filterOutsideSelection)).WhereNotNull()];
Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
75return [.. textChanges.Select(change => ProtocolConversions.TextChangeToTextEdit(change, documentSyntax.Text))];
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (1)
112return ReadCodeSnippetElements(document)?.Select(element => new CodeSnippet(element)).ToImmutableArray();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Completion\CompletionFeaturesTests.cs (3)
414var defaultCharArray = CompletionRules.Default.DefaultCommitCharacters.Select(c => c.ToString()).ToArray(); 462var defaultCharArray = CompletionRules.Default.DefaultCommitCharacters.Select(c => c.ToString()).ToArray(); 805var defaultCharArray = CompletionRules.Default.DefaultCommitCharacters.Select(c => c.ToString()).ToArray();
SpellCheck\SpellCheckTests.cs (1)
565.SelectMany(kvp => kvp.Value.Select(textSpan => (kind: kvp.Key, textSpan))
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CSharpRebuildTests.cs (1)
38.Select(x => compilationFactory.CreateSyntaxTree(x.FilePath, x.GetText()))
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\SymbolFinder\RemoteSymbolFinderService.cs (1)
64documentArgs.Select(solution.GetDocument).WhereNotNull().ToImmutableHashSet();
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
GlobalAssemblyCacheTests.cs (1)
110var gacLocationsUpper = GlobalAssemblyCacheLocation.RootLocations.Select(location => location.ToUpper());
Microsoft.CodeAnalysis.Test.Utilities (5)
BaseCompilerFeatureRequiredTests.cs (1)
19var featureLengthAndName = string.Join(" ", builder.ToImmutableArray().Select(b => $"{b:x2}"));
Compilation\CompilationDifference.cs (1)
177EmitResult.UpdatedMethods.Select(methodHandle => $"0x{MetadataTokens.GetToken(methodHandle):X8}"));
Compilation\CompilationExtensions.cs (2)
90Assert.True(emitResult.Success, "Diagnostics:\r\n" + string.Join("\r\n", emitResult.Diagnostics.Select(d => d.ToString()))); 104Assert.True(emitResult.Success, "Diagnostics: " + string.Join(", ", emitResult.Diagnostics.Select(d => d.ToString())));
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2824var trees = symbol.DeclaringSyntaxReferences.Select(syntaxRef => syntaxRef.SyntaxTree).Distinct();
Microsoft.CodeAnalysis.UnitTests (12)
Analyzers\AnalyzerFileReferenceTests.cs (11)
127var analyzerNames = analyzers.Select(a => a.GetType().Name); 134analyzerNames = analyzers.Select(a => a.GetType().Name); 369var typeNames = generators.Select(g => g.GetGeneratorType().FullName); 407var typeNames = generators.Select(g => g.GetGeneratorType().FullName); 429var typeNames = generators.Select(g => g.GetGeneratorType().FullName); 519var csharpAnalyzers = reference.GetAnalyzers(LanguageNames.CSharp).Select(a => a.GetType().FullName).ToArray(); 526var vbAnalyzers = reference.GetAnalyzers(LanguageNames.VisualBasic).Select(a => a.GetType().FullName).ToArray(); 534var allAnalyzers = reference.GetAnalyzersForAllLanguages().Select(a => a.GetType().FullName).ToArray(); 552var csharpGenerators = reference.GetGenerators(LanguageNames.CSharp).Select(g => g.GetGeneratorType().FullName).ToArray(); 565var vbGenerators = reference.GetGenerators(LanguageNames.VisualBasic).Select(g => g.GetGeneratorType().FullName).ToArray(); 574var allGenerators = reference.GetGeneratorsForAllLanguages().Select(g => g.GetGeneratorType().FullName).ToArray();
AssemblyUtilitiesTests.cs (1)
131var results = AssemblyUtilities.IdentifyMissingDependencies(_testFixture.Alpha, new[] { _testFixture.Alpha }).Select(identity => identity.Name);
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (13)
FlowAnalysis\FlowTestBase.vb (13)
228AssertEx.Equal(If(alwaysAssigned, {}), analysis.AlwaysAssigned.Select(Function(s) s.Name).ToArray()) 229AssertEx.Equal(If(captured, {}), analysis.Captured.Select(Function(s) s.Name).ToArray()) 230AssertEx.Equal(If(dataFlowsIn, {}), analysis.DataFlowsIn.Select(Function(s) s.Name).ToArray()) 231AssertEx.Equal(If(dataFlowsOut, {}), analysis.DataFlowsOut.Select(Function(s) s.Name).ToArray()) 232AssertEx.Equal(If(definitelyAssignedOnEntry, {}), analysis.DefinitelyAssignedOnEntry.Select(Function(s) s.Name).ToArray()) 233AssertEx.Equal(If(definitelyAssignedOnExit, {}), analysis.DefinitelyAssignedOnExit.Select(Function(s) s.Name).ToArray()) 234AssertEx.Equal(If(readInside, {}), analysis.ReadInside.Select(Function(s) s.Name).ToArray()) 235AssertEx.Equal(If(readOutside, {}), analysis.ReadOutside.Select(Function(s) s.Name).ToArray()) 236AssertEx.Equal(If(variablesDeclared, {}), analysis.VariablesDeclared.Select(Function(s) s.Name).ToArray()) 237AssertEx.Equal(If(writtenInside, {}), analysis.WrittenInside.Select(Function(s) s.Name).ToArray()) 238AssertEx.Equal(If(writtenOutside, {}), analysis.WrittenOutside.Select(Function(s) s.Name).ToArray()) 239AssertEx.Equal(If(capturedInside, {}), analysis.CapturedInside.Select(Function(s) s.Name).ToArray()) 240AssertEx.Equal(If(capturedOutside, {}), analysis.CapturedOutside.Select(Function(s) s.Name).ToArray())
Microsoft.CodeAnalysis.Workspaces (60)
Editing\SymbolEditor.cs (1)
195.Select(sr => sr.GetSyntax())
Editing\SyntaxGenerator.cs (18)
193typeParameters: method.TypeParameters.Select(p => TypeParameter(p)), 194parameters: method.Parameters.Select(p => ParameterDeclaration(p)), 286parameters: method.Parameters.Select(p => ParameterDeclaration(p)), 452indexer.Parameters.Select(p => this.ParameterDeclaration(p)), 528var parameters = invoke?.Parameters.Select(p => this.ParameterDeclaration(p)); 561constructorMethod.Parameters.Select(p => ParameterDeclaration(p)), 763type.TypeParameters.Select(TypeParameter), 767interfaceTypes: type.Interfaces.Select(TypeExpression), 772type.TypeParameters.Select(TypeParameter), 775interfaceTypes: type.Interfaces.Select(TypeExpression), 779type.TypeParameters.Select(TypeParameter), 781interfaceTypes: type.Interfaces.Select(TypeExpression), 793typeParameters: type.TypeParameters.Select(TypeParameter), 794parameters: invoke.Parameters.Select(p => ParameterDeclaration(p)), 864declaration = WithTypeParameters(declaration, typeParameters.Select(tp => TypeParameter(tp))); 875types: tp.ConstraintTypes.Select(TypeExpression)); 1024var args = attribute.ConstructorArguments.Select(a => this.AttributeArgument(this.TypedConstantExpression(a))) 1025.Concat(attribute.NamedArguments.Select(n => this.AttributeArgument(n.Key, this.TypedConstantExpression(n.Value))))
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
93result.AddRange(filteredProjects.Select(p => p.project));
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (3)
97var parameterNode = parameter.DeclaringSyntaxReferences.Select(r => r.GetSyntax(cancellationToken)).FirstOrDefault(); 108var lambdaNode = parameter.ContainingSymbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax(cancellationToken)).First(); 148var lambdaNode = symbol.ContainingSymbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax(cancellationToken)).First();
FindSymbols\SymbolTree\SymbolTreeInfo.cs (1)
300=> new(sortedNodes.Select(n => n.Name));
ReassignedVariable\AbstractReassignedVariableService.cs (1)
272.Select(r => r.GetSyntax(cancellationToken))
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
539.Select(symbol => GetSymbolLocation(solution, symbol, _cancellationToken))
Serialization\SerializedPortableExecutableReference.cs (1)
66Guids={modules.Select(m => GetMetadataGuid(m).ToString()).Join(",")}
Shared\Extensions\IMethodSymbolExtensions.cs (4)
72!method1.Parameters.Select(p => p.Name).SequenceEqual(method2.Parameters.Select(p => p.Name))) 87return p1.Select(p => p.Type).ToList().AreMoreSpecificThan([.. p2.Select(p => p.Type)]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (1)
44.Select(section => (matchKind: section.GetMatchKind(language), section))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
605var declarationSyntax = symbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).FirstOrDefault();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeParameterSymbolExtensions.cs (1)
13=> typeParameter.ConstraintTypes.Select(GetNamedTypeSymbol).WhereNotNull().FirstOrDefault();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
108symbols.AddRange(interfaceType.AllInterfaces.Select(i => i.OriginalDefinition));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.SubstituteTypesVisitor.cs (1)
86var substitutedArguments = symbol.TypeArguments.Select(t => t.Accept(this));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
307return string.Join(", ", symbols.Select(symbol => symbol.ToEditorConfigString())); 405return string.Join(", ", accessibilities.Select(accessibility => accessibility.ToEditorConfigString(languageName))); 464return string.Join(", ", modifiers.Select(modifier => modifier.ToEditorConfigString(languageName)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (2)
351new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 352new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (1)
99selectedMembers.AddRange(GetDeclaratorsAndIdentifiers(member).Select(pair => pair.declarator));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (1)
92return this.GetMembers().Select(m => m.Name).ToList();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
196var diagnostics = string.Join(", ", errors.Select(d => d.ToString()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (3)
30.Select(tp => tp.Name) 47if (method.TypeParameters.Select(t => t.Name).SequenceEqual(newNames)) 81if (parameterList.Select(p => p.Name).SequenceEqual(parameterNames))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (1)
18if (parameterList.Select(p => p.Name).SequenceEqual(parameterNames))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ITypeInferenceServiceExtensions.cs (1)
49var delegateTypes = types.Select(t => t.GetDelegateType(semanticModel.Compilation));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
159IEnumerable<(TType instance, (TNode semanticNode, IEnumerable<TNode> additionalNodes) nodes)> originalNodePairs = originalNodes.Select(n => (n, selector(n)));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (2)
87.Select(t => t.InferredType) 99.Select(info => info.InferredType)
Storage\SQLite\v2\SQLitePersistentStorage.Accessor.cs (5)
72({string.Join(",", _allColumns.Select(c => c.name))}) values ({string.Join(",", _allColumns.Select(n => "?"))}) 80{string.Join(" and ", _primaryKeyColumns.Select(k => $"{k.name} = ?"))} 113{string.Join(",", _allColumns.Select(k => $"{k.name} {k.type} not null"))}, 114primary key({string.Join(",", _primaryKeyColumns.Select(k => k.name))})
Workspace\CommandLineProject.cs (1)
73foreach (var path in commandLineArguments.AnalyzerReferences.Select(r => r.FilePath))
Workspace\DocumentTracking\IDocumentTrackingServiceExtensions.cs (1)
29.Select(solution.GetDocument)
Workspace\Solution\TextDocumentStates.cs (1)
152States.AddRange(states.Select(state => KeyValuePairUtil.Create(state.Id, state))),
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
418foreach (var path in commandLineArgs.AnalyzerReferences.Select(r => r.FilePath))
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
NetCoreTests.cs (1)
513Assert.Contains("LibraryHelperClass = Library.MyHelperClass", option.GlobalImports.Select(i => i.Name));
VisualStudioMSBuildWorkspaceTests.cs (1)
1850actual: imports.Select(i => i.Name));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\NamingStyleTestUtilities.cs (1)
28=> string.Join(",", items.Select(item => item.ToString()));
Microsoft.CodeAnalysis.Workspaces.UnitTests (15)
UtilityTest\IntervalTreeTests.cs (15)
95var spans = GetIntervalsThatOverlapWith(tree, 5, 5).Select(t => t.Item3); 106var spans = GetIntervalsThatOverlapWith(tree, 5, 2).Select(i => i.Item3); 117var spans = GetIntervalsThatOverlapWith(tree, 8, 2).Select(i => i.Item3); 128var spans = GetIntervalsThatOverlapWith(tree, 7, 2).Select(i => i.Item3); 139var spans = GetIntervalsThatOverlapWith(tree, 4, 2).Select(i => i.Item3); 150var spans = GetIntervalsThatOverlapWith(tree, 9, 2).Select(i => i.Item3); 161var spans = GetIntervalsThatOverlapWith(tree, 4, 7).Select(i => i.Item3); 178Assert.True(Set("A").SetEquals(GetIntervalsThatOverlapWith(tree, 6, 2).Select(i => i.Item3))); 179Assert.True(Set("B").SetEquals(GetIntervalsThatOverlapWith(tree, 16, 2).Select(i => i.Item3))); 182Assert.True(Set("A", "B").SetEquals(GetIntervalsThatOverlapWith(tree, 2, 20).Select(i => i.Item3))); 183Assert.True(Set("A", "B").SetEquals(GetIntervalsThatOverlapWith(tree, 2, 14).Select(i => i.Item3))); 184Assert.True(Set("A", "B").SetEquals(GetIntervalsThatOverlapWith(tree, 6, 10).Select(i => i.Item3))); 185Assert.True(Set("A", "B").SetEquals(GetIntervalsThatOverlapWith(tree, 6, 20).Select(i => i.Item3))); 323var set1 = new HashSet<string>(GetIntervalsThatOverlapWith(tree, start, length).Select(i => i.Item3)); 330var set3 = new HashSet<string>(GetIntervalsThatIntersectWith(tree, start, length).Select(i => i.Item3));
Microsoft.Gen.ContextualOptions (2)
Parser.cs (2)
57type.Definitions.Select(def => Diagnostic.Create(DiagDescriptors.ContextMustBePartial, def.Identifier.GetLocation(), type.Name))); 68type.Definitions.Select(def => Diagnostic.Create(DiagDescriptors.ContextDoesNotHaveValidProperties, def.Identifier.GetLocation(), type.Name)));
Microsoft.Gen.Logging (2)
Parsing\Parser.cs (2)
326lt.AllMembers.AddRange(methodSymbol.ContainingType.GetMembers().Select(x => x.Name)); 473.Select(static attribute => attribute.AttributeClass)
Microsoft.Interop.ComInterfaceGenerator (3)
AttributeInfo.cs (1)
28var args = attribute.ConstructorArguments.Select(ca => ca.ToCSharpString());
ComMethodInfo.cs (1)
97new ComMethodInfo(null!, method.Name, method.GetAttributes().Select(AttributeInfo.From).ToImmutableArray().ToSequenceEqual(), false),
VirtualMethodPointerStubGenerator.cs (1)
161methodStub.CallingConvention.Array.Select(callConv => TypeOfExpression(TypeSyntaxes.CallConv(callConv.Name.ValueText)))))))
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSManagedTypeInfo.cs (2)
148.Select(arg => CreateJSTypeInfoForTypeSymbol(arg) as JSSimpleTypeInfo) 159.Select(argName => CreateJSTypeInfoForTypeSymbol(argName) as JSSimpleTypeInfo)
Microsoft.Interop.SourceGeneration (1)
BoundGenerators.cs (1)
179NativeParameterMarshallers.Select(marshaler => marshaler.AsParameter(context)))),
Microsoft.ML.Data (1)
Transforms\Normalizer.cs (1)
497public IEnumerator<IColumnFunction> GetEnumerator() => _infos.Select(info => info.ColumnFunction).GetEnumerator();
Microsoft.ML.Samples (8)
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportance.cs (1)
58var auc = permutationMetrics.Select(x => x.AreaUnderRocCurve).ToArray();
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportanceLoadFromDisk.cs (1)
57var auc = permutationMetrics.Select(x => x.AreaUnderRocCurve).ToArray();
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportance.cs (1)
61var microAccuracy = permutationMetrics.Select(x => x.MicroAccuracy)
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportanceLoadFromDisk.cs (1)
69var microAccuracy = permutationMetrics.Select(x => x.MicroAccuracy)
Dynamic\Trainers\Ranking\PermutationFeatureImportance.cs (1)
63var ndcg = permutationMetrics.Select(
Dynamic\Trainers\Ranking\PermutationFeatureImportanceLoadFromDisk.cs (1)
70var ndcg = permutationMetrics.Select(
Dynamic\Trainers\Regression\PermutationFeatureImportance.cs (1)
66var rmse = permutationMetrics.Select(x => x.RootMeanSquaredError)
Dynamic\Trainers\Regression\PermutationFeatureImportanceLoadFromDisk.cs (1)
73var rmse = permutationMetrics.Select(x => x.RootMeanSquaredError)
Microsoft.ML.TensorFlow (2)
TensorflowTransform.cs (2)
572var colTypeDims = vecType.Dimensions.Select(dim => (int)dim).ToArray(); 582var colTypeDims = vecType.Dimensions.Select(dim => (int)dim).ToArray();
Microsoft.ML.Transforms (1)
Text\NgramHashingTransformer.cs (1)
227string[][] friendlyNames = _columns.Select(c => c.FriendlyNames).ToArray();
Microsoft.ML.Vision (1)
DnnRetrainTransform.cs (1)
793var colTypeDims = vecType.Dimensions.Select(dim => (int)dim).ToArray();
Microsoft.VisualStudio.LanguageServices (20)
CallHierarchy\Finders\ImplementerFinder.cs (1)
44var sourceLocations = implementation.DeclaringSyntaxReferences.Select(d => project.Solution.GetDocument(d.SyntaxTree)).WhereNotNull();
CallHierarchy\Finders\OverridingMemberFinder.cs (1)
40var sourceLocations = @override.DeclaringSyntaxReferences.Select(d => project.Solution.GetDocument(d.SyntaxTree)).WhereNotNull();
ColorSchemes\ColorSchemeApplier.RegistryItemConverter.cs (1)
23return [.. scheme.Themes.Select(ToRegistryItem)];
Implementation\VisualStudioSupportsFeatureService.cs (1)
114return ids.Select(id => ContainedDocument.TryGetContainedDocument(id))
MoveToNamespace\MoveToNamespaceDialogViewModel.cs (1)
31.. namespaceHistory.Select(n => new NamespaceItem(true, n))
PickMembers\PickMembersDialogViewModel.cs (2)
37_allMembers = [.. members.Select(m => new MemberSymbolViewModel(m, glyphService))]; 39Options = [.. options.Select(o => new OptionViewModel(o))];
Progression\GraphBuilder.cs (1)
371commonLabel.Append(string.Join(", ", typeSymbol.TypeParameters.Select(t => t.Name)));
Progression\GraphQueryManager.cs (2)
103var tasks = liveQueries.Select(t => PopulateContextGraphAsync(solution, t.context, t.queries, disposalToken)).ToArray(); 124var tasks = graphQueries.Select(q => Task.Run(() => q.GetGraphAsync(solution, context, cancellationToken), cancellationToken)).ToHashSet();
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
286var activeProjectId = GetActiveContextProjectIdAndWatchHierarchies_NoLock(moniker, documentIds.Select(d => d.ProjectId), hierarchy);
ProjectSystem\VisualStudioWorkspaceImpl_SourceGenerators.cs (1)
72foreach (var projectId in documentIds.Select(i => i.ProjectId).Distinct())
PullMemberUp\SymbolDependentsBuilder.cs (1)
58var tasks = _declarationService.GetDeclarations(_member).Select(@ref => @ref.GetSyntaxAsync(_cancellationToken));
StackTraceExplorer\FrameViewModel.cs (1)
40public string AutomationName => string.Join("", Inlines.Select(InlineExtensions.GetText));
UnusedReferences\Dialog\UnusedReferencesTableProvider.DataSource.cs (1)
38.Select(update => new UnusedReferencesEntry(solutionName, project.Name, project.Language, update))
UnusedReferences\VisualStudioReferenceCleanupService.cs (1)
35return [.. projectSystemReferences.Select(reference => reference.ToReferenceInfo())];
Venus\ContainedDocument.DocumentServiceProvider.cs (1)
78var mappedSpanResults = await MapSpansAsync(oldDocument, textChanges.Select(tc => tc.Span), CancellationToken.None).ConfigureAwait(false);
Venus\ContainedLanguageCodeSupport.cs (3)
70var reservedNames = semanticModel.LookupSymbols(point.Value.Position, type).Select(m => m.Name); 270var memberNode = member.DeclaringSyntaxReferences.Select(r => r.GetSyntax(cancellationToken)).FirstOrDefault(); 450return string.Format("{0}({1})", member.Name, string.Join(",", ((IMethodSymbol)member).Parameters.Select(p => p.Type.ToDisplayString())));
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageClient\XamlCapabilities.cs (1)
23AllCommitCharacters = [.. RoslynCompletion.CompletionRules.Default.DefaultCommitCharacters.Select(c => c.ToString())]
Roslyn.Test.PdbUtilities (1)
EditAndContinue\EditAndContinueTestUtilities.cs (1)
110AssertEx.Equal(expectedNames, entityHandles.Select(handle =>
Roslyn.VisualStudio.Next.UnitTests (1)
Remote\SerializationValidator.cs (1)
69public IEnumerator<T> GetEnumerator() => Children.Select(t => t).GetEnumerator();
RunTests (4)
AssemblyScheduler.cs (3)
134kvp => kvp.Value.Select(WithTypeExecutionTime).ToImmutableArray()); 141var tests = typeInfo.Tests.Select(WithTestExecutionTime).ToImmutableArray(); 301logger($" - {testFilters.Length} tests: {string.Join(",", testFilters.Select(t => t.FullyQualifiedName))}");
TestRunner.cs (1)
98var helixWorkItems = workItems.Select(workItem => MakeHelixWorkItemProject(workItem));
System.Text.Json.SourceGeneration (2)
Helpers\RoslynExtensions.cs (2)
69.Select(e => compilation.EraseCompileTimeMetadata(e.Type)) 93.Select(compilation.EraseCompileTimeMetadata)
System.Windows.Forms.Design.Tests (1)
System\Resources\Tools\CodeDomCompileHelper.cs (1)
53throw new InvalidOperationException(string.Join('\n', result.Diagnostics.Select(d => d.GetMessage())));