1 instantiation of Project
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\Solution.cs (1)
158return new Project(solution, state);
2186 references to Project
AnalyzerRunner (10)
CodeRefactoringRunner.cs (1)
55foreach (var project in solution.Projects)
DiagnosticAnalyzerRunner.cs (7)
45var project = solution.GetProject(projectId)!; 95foreach (var project in solution.Projects) 107var project = solution.GetProject(projectId); 153var project = solution.GetProject(projectId); 178private static async Task<DocumentAnalyzerPerformance> TestDocumentPerformanceAsync(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, Project project, DocumentId documentId, Options analyzerOptionsInternal, CancellationToken cancellationToken) 327foreach (var project in solution.Projects) 381Project project,
Program.cs (2)
148foreach (var project in projects) 188private static Statistic GetSolutionStatistics(IEnumerable<Project> projects, CancellationToken cancellationToken)
IdeBenchmarks (1)
InheritanceMargin\BenchmarksHelpers.cs (1)
23foreach (var project in solution.Projects)
IdeCoreBenchmarks (14)
ClassificationBenchmarks.cs (1)
96var project = _solution.Projects.First(p => p.AssemblyName == "Microsoft.CodeAnalysis");
FindReferencesBenchmarks.cs (1)
93var project = _solution.Projects.First(p => p.AssemblyName == "Microsoft.CodeAnalysis");
IncrementalSourceGeneratorBenchmarks.cs (1)
145var project = _workspace.CurrentSolution.Projects.Single(p => p.Name == "Microsoft.CodeAnalysis.Workspaces(netstandard2.0)");
NavigateToBenchmarks.cs (4)
111foreach (var project in _workspace.CurrentSolution.Projects) 145foreach (var project in _workspace.CurrentSolution.Projects) 164foreach (var project in _workspace.CurrentSolution.Projects) 226private async Task<int> SearchAsync(Solution solution, IGrouping<INavigateToSearchService, Project> grouping, ImmutableArray<Document> priorityDocuments)
ProjectOperationBenchmarks.cs (5)
23private Project _emptyProject; 24private Project _hundredProject; 25private Project _thousandsProject; 39private Project Project 63static Project CreateProject(ref Solution solution, string name, int documentCount)
RenameBenchmarks.cs (1)
47var project = _solution.Projects.First();
SwitchStatementBenchmarks.cs (1)
74var project = solution.Projects.First();
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
264GetOrMakeTargetClassAsync(Project proj, FixDetails details, CancellationToken cancellationToken)
Microsoft.Analyzers.Extra.Tests (19)
CallAnalysis\LegacyLoggingTests.cs (1)
815var proj = RoslynTestUtils
Resources\RoslynTestUtils.cs (18)
30public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true, 64public static void CommitChanges(this Project proj) 69public static Project WithDocument(this Project proj, string name, string text) 74public static Document FindDocument(this Project proj, string name) 182var proj = CreateTestProject(references, includeBaseReferences); 210var proj = CreateTestProject(references, includeBaseReferences); 242var proj = CreateTestProject(references, testAssemblyName: testAssemblyName); 298var proj = CreateTestProject(references, testAssemblyName: testAssemblyName); 363var changedProj = solution.GetProject(proj.Id); 413var proj = CreateTestProject(references); 457var changedProj = solution.GetProject(proj.Id); 492private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 513Project project, 522public override async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 533public override async Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken) 549private Project _project;
Microsoft.Analyzers.Local.Tests (18)
Resources\RoslynTestUtils.cs (18)
30public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true, 64public static void CommitChanges(this Project proj) 69public static Project WithDocument(this Project proj, string name, string text) 74public static Document FindDocument(this Project proj, string name) 182var proj = CreateTestProject(references, includeBaseReferences); 210var proj = CreateTestProject(references, includeBaseReferences); 242var proj = CreateTestProject(references, testAssemblyName: testAssemblyName); 299var proj = CreateTestProject(references, testAssemblyName: testAssemblyName); 364var changedProj = solution.GetProject(proj.Id); 414var proj = CreateTestProject(references); 458var changedProj = solution.GetProject(proj.Id); 493private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 514Project project, 523public override async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 534public override async Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken) 550private Project _project;
Microsoft.AspNetCore.Analyzer.Testing (10)
CodeFixRunner.cs (2)
36var updatedProject = updatedSolution.GetProject(document.Project.Id); 44private async Task EnsureCompilable(Project project)
DiagnosticAnalyzerRunner.cs (3)
37var project = DiagnosticProject.Create(GetType().Assembly, sources); 54IEnumerable<Project> projects, 60foreach (var project in projects)
DiagnosticProject.cs (1)
31public static Project Create(Assembly testAssembly, string[] sources, Func<Workspace> workspaceFactory = null, Type[] analyzerReferences = null)
DiagnosticVerifier.cs (4)
73var projects = new HashSet<Project>(); 80foreach (var project in projects) 141var project = CreateProject(sources); 154protected Project CreateProject(params string[] sources)
Microsoft.AspNetCore.App.Analyzers.Test (8)
Infrastructure\WellKnownTypesTests.cs (1)
63var project = TestDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, source.Source);
TestDiagnosticAnalyzer.cs (7)
31var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 48var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 70var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 109var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 146public static Project CreateProjectWithReferencesInBinDir(Assembly testAssembly, params string[] source) 154var project = DiagnosticProject.Create(testAssembly, source, createWorkspace, [typeof(RoutePatternClassifier), typeof(ExtensionMethodsCompletionProvider)]); 166public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
Microsoft.AspNetCore.Components.Analyzers.Tests (6)
AnalyzerTestBase.cs (1)
31public Project CreateProject(string source)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (1)
24public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
Helpers\DiagnosticVerifier.Helper.cs (4)
53var projects = new HashSet<Project>(); 60foreach (var project in projects) 116var project = CreateProject(sources, language); 144private static Project CreateProject(string[] sources, string language = LanguageNames.CSharp)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (6)
AnalyzerTestBase.cs (1)
31public Project CreateProject(string source)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (1)
24public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
Helpers\DiagnosticVerifier.Helper.cs (4)
53var projects = new HashSet<Project>(); 60foreach (var project in projects) 116var project = CreateProject(sources, language); 144private static Project CreateProject(string[] sources, string language = LanguageNames.CSharp)
Microsoft.AspNetCore.Http.Extensions.Tests (12)
RequestDelegateGenerator\CompileTimeCreationTests.cs (8)
53var project = CreateProject(); 79var project = CreateProject(); 158var project = CreateProject(modifyCompilationOptions: 231var project = CreateProject(); 285var project = CreateProject(); 332var project = CreateProject(); 668var project = CreateProject(); 725var project = CreateProject();
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (4)
39private static readonly Project _baseProject = CreateProject(); 306var project = _baseProject.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project; 311internal static Project CreateProject(Func<CSharpCompilationOptions, CSharpCompilationOptions> modifyCompilationOptions = null) 320var project = new AdhocWorkspace().CurrentSolution
Microsoft.AspNetCore.Http.Microbenchmarks (5)
RequestDelegateGeneratorBenchmarks.cs (1)
25var project = CreateProject();
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (4)
39private static readonly Project _baseProject = CreateProject(); 306var project = _baseProject.AddDocument("TestMapActions.cs", SourceText.From(source, Encoding.UTF8)).Project; 311internal static Project CreateProject(Func<CSharpCompilationOptions, CSharpCompilationOptions> modifyCompilationOptions = null) 320var project = new AdhocWorkspace().CurrentSolution
Microsoft.CodeAnalysis.CodeStyle.Fixes (26)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (4)
22Project project, 36Compilation compilation, ISet<string> availableTypeParameterNames, Project project, CancellationToken cancellationToken) : AsyncSymbolVisitor 42private readonly Project _project = project; 126INamedTypeSymbol constraintType, IImmutableSet<Project> projects)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
55foreach (var project in fixAllContext.Solution.Projects)
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (5)
22public abstract Solution UpgradeProject(Project project, string version); 23public abstract bool IsUpgrade(Project project, string newVersion); 43var project = context.Document.Project; 82var currentProject = currentSolution.GetRequiredProject(projectId); 93private bool CanUpgrade(Project project, string language, string version)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\FixAllHelper.cs (1)
16Project triggerProject)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (2)
38public static Project GetRequiredProject(this Solution solution, ProjectId projectId) 40var project = solution.GetProject(projectId);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (9)
18public static TLanguageService? GetLanguageService<TLanguageService>(this Project? project) where TLanguageService : class, ILanguageService 25public static TLanguageService GetRequiredLanguageService<TLanguageService>(this Project project) where TLanguageService : class, ILanguageService 34/// Gets extended host language services, which includes language services from <see cref="Project.LanguageServices"/>. 36public static HostLanguageServices GetExtendedLanguageServices(this Project project) 45public static string? TryGetAnalyzerConfigPathForProjectConfiguration(this Project project) 48public static string? TryGetAnalyzerConfigPathForDiagnosticConfiguration(this Project project, Diagnostic diagnostic) 54private static string? TryGetAnalyzerConfigPathForProjectOrDiagnosticConfiguration(Project project, Diagnostic? diagnostic) 102public static AnalyzerConfigDocument? TryGetExistingAnalyzerConfigDocumentAtPath(this Project project, string analyzerConfigPath) 110public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (2)
58foreach (var sourceProject in solution.Projects) 76var project = solution.GetProject(symbol.ContainingAssembly, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SyntacticDocument.cs (1)
25public Project Project => Document.Project;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
12public static bool CanApplyParseOptionChange(this Project project, ParseOptions oldOptions, ParseOptions newOptions)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\UpdateProjectToAllowUnsafe\CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
39private static Solution AllowUnsafeOnProject(Project project)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (2)
88public override Solution UpgradeProject(Project project, string newVersion) 104public override bool IsUpgrade(Project project, string newVersion)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
40var project = document.Project;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
RawStringLiteral\RawStringLiteralCommandHandler_Return.cs (1)
165var project = document.Project;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (68)
CodeActions\AddUsing\AddUsingNuGetTests.cs (4)
225installerServiceMock.Setup(i => i.GetProjectsWithInstalledPackage(It.IsAny<Solution>(), "NuGetPackage", "1.0")).Returns(ImmutableArray<Project>.Empty); 226installerServiceMock.Setup(i => i.GetProjectsWithInstalledPackage(It.IsAny<Solution>(), "NuGetPackage", "2.0")).Returns(ImmutableArray<Project>.Empty); 312installerServiceMock.Setup(i => i.GetProjectsWithInstalledPackage(It.IsAny<Solution>(), "NuGetPackage", "1.0")).Returns(ImmutableArray<Project>.Empty); 349installerServiceMock.Setup(i => i.GetProjectsWithInstalledPackage(It.IsAny<Solution>(), "NuGetPackage", "1.0")).Returns(ImmutableArray<Project>.Empty);
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
46internal override CompletionService GetCompletionService(Project project)
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (4)
3190var p1 = workspace.CurrentSolution.Projects.First(p => p.Name == "P1"); 3191var updatedP1 = p1.AddMetadataReference(reference); 3244var project = workspace.CurrentSolution.Projects.Single(); 3245var updatedProject = project.AddMetadataReference(libRef);
Completion\CompletionServiceTests.cs (1)
206var project = SolutionUtilities.AddEmptyProject(workspace.CurrentSolution)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
779var project = workspace.CurrentSolution.Projects.Single();
EditAndContinue\ActiveStatementTrackingServiceTests.cs (1)
64var project = solution.Projects.Single();
Formatting\CodeCleanupTests.cs (1)
789var project = workspace.CurrentSolution.Projects.Single();
Formatting\CodeCleanupTests.TestFixers.cs (2)
93Project? project = null; 149Project? project = null;
Formatting\RazorLineFormattingOptionsTests.cs (1)
47var project = workspace.AddProject("Test", LanguageNames.CSharp);
NavigateTo\NavigateToSearcherTests.cs (15)
40It.IsAny<ImmutableArray<Project>>(), 49ImmutableArray<Project> projects, 64It.IsAny<ImmutableArray<Project>>(), 72ImmutableArray<Project> projects, 90It.IsAny<ImmutableArray<Project>>(), 99ImmutableArray<Project> projects, 132hostMock.Setup(h => h.GetNavigateToSearchService(It.IsAny<Project>())).Returns(searchService.Object); 171hostMock.Setup(h => h.GetNavigateToSearchService(It.IsAny<Project>())).Returns(searchService.Object); 210hostMock.Setup(h => h.GetNavigateToSearchService(It.IsAny<Project>())).Returns(searchService.Object); 246hostMock.Setup(h => h.GetNavigateToSearchService(It.IsAny<Project>())).Returns(searchService.Object); 278hostMock.Setup(h => h.GetNavigateToSearchService(It.IsAny<Project>())).Returns(() => null); 336hostMock.Setup(h => h.GetNavigateToSearchService(It.IsAny<Project>())).Returns(() => searchService); 368public Task SearchCachedDocumentsAsync(Solution solution, ImmutableArray<Project> projects, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken) 380public Task SearchGeneratedDocumentsAsync(Solution solution, ImmutableArray<Project> projects, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken) 386public Task SearchProjectsAsync(Solution solution, ImmutableArray<Project> projects, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (9)
102Project project, 122Project project, 173var mappedProject = provider.MapDocument(document); 188protected static Task<(Project, ISymbol)> CompileAndFindSymbolAsync( 203protected static async Task<(Project, ISymbol)> CompileAndFindSymbolAsync( 224var project = workspace.CurrentSolution.Projects.First(); 249protected static void CompileTestSource(string path, SourceText source, Project project, Location pdbLocation, Location sourceLocation, bool buildReferenceAssembly, bool windowsPdb, Encoding? fallbackEncoding = null) 259protected static void CompileTestSource(string dllFilePath, string sourceCodePath, string? pdbFilePath, string assemblyName, SourceText source, Project project, Location pdbLocation, Location sourceLocation, bool buildReferenceAssembly, bool windowsPdb, Encoding? fallbackEncoding = null) 264protected static void CompileTestSource(string dllFilePath, string[] sourceCodePaths, string? pdbFilePath, string assemblyName, SourceText[] sources, Project project, Location pdbLocation, Location sourceLocation, bool buildReferenceAssembly, bool windowsPdb, Encoding? fallbackEncoding = null)
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (7)
170var implProject = workspace.CurrentSolution.Projects.First(); 237var implProject = workspace.CurrentSolution.Projects.First(); 298var implProject = workspace.CurrentSolution.Projects.First(); 353var implProject = workspace.CurrentSolution.Projects.First(); 404var implProject = workspace.CurrentSolution.Projects.First(); 469var implProject = workspace.CurrentSolution.Projects.First(); 527var implProject = workspace.CurrentSolution.Projects.First();
PdbSourceDocument\NullResultMetadataAsSourceFileProvider.cs (2)
41public Task<MetadataAsSourceFile?> GetGeneratedFileAsync(MetadataAsSourceWorkspace metadataWorkspace, Workspace sourceWorkspace, Project sourceProject, ISymbol symbol, bool signaturesOnly, MetadataAsSourceOptions options, string tempPath, TelemetryMessage? telemetry, CancellationToken cancellationToken) 46public Project? MapDocument(Document document)
PdbSourceDocument\PdbSourceDocumentTests.cs (3)
484var implProject = workspace.CurrentSolution.Projects.First(); 531var implProject = workspace.CurrentSolution.Projects.First(); 936var project = workspace.CurrentSolution.Projects.First();
SymbolKey\SymbolKeyTests.cs (8)
44var project = solution.Projects.Single(); 79var project = solution.Projects.Single(); 118var project = solution.Projects.Single(); 164var project = solution.Projects.Single(); 196var bodyProject = solution.Projects.Single(p => p.AssemblyName == "BodyProject"); 197var referenceProject = solution.Projects.Single(p => p.AssemblyName == "ReferenceProject"); 254async Task<(Compilation bodyCompilation, Compilation referenceCompilation)> GetCompilationsAsync(Project bodyProject, Project referenceProject)
Workspaces\WorkspaceTests_EditorFeatures.cs (8)
1053var project = workspace.CurrentSolution.Projects.Single(); 1077var project = workspace.CurrentSolution.Projects.Single(); 1109var project = workspace.CurrentSolution.Projects.Single(); 1142var project = workspace.CurrentSolution.Projects.Single(); 1232var project = workspace.CurrentSolution.Projects.Single(); 1268var project = workspace.CurrentSolution.Projects.Single(); 1306var project = workspace.CurrentSolution.Projects.Single(); 1334var project = workspace.CurrentSolution.Projects.Single();
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
60var project = solution.AddProject("test", "test", LanguageNames.CSharp);
Microsoft.CodeAnalysis.CSharp.Features (13)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (2)
61private static bool ShouldOfferRefactoring(Project project) 69Project project, CodeActionPurpose purpose, CancellationToken cancellationToken)
GenerateType\CSharpGenerateTypeService.cs (1)
658internal override bool IsPublicOnlyAccessibility(ExpressionSyntax expression, Project project)
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
25protected override Task<ISymbol> FindRelatedExplicitlyDeclaredSymbolAsync(Project project, ISymbol symbol, CancellationToken cancellationToken)
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (2)
44protected abstract Task UpdateReferencesAsync(Project project, SolutionEditor solutionEditor, ISymbol implMember, INamedTypeSymbol containingType, CancellationToken cancellationToken); 210Project project, MemberImplementationMap implMemberToInterfaceMembers, CancellationToken cancellationToken)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
40Project project, SolutionEditor solutionEditor,
ImplementInterface\CSharpImplementImplicitlyCodeRefactoringProvider.cs (1)
45protected override Task UpdateReferencesAsync(Project project, SolutionEditor solutionEditor, ISymbol implMember, INamedTypeSymbol containingType, CancellationToken cancellationToken)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (1)
80var project = document.Project;
src\Analyzers\CSharp\CodeFixes\UpdateProjectToAllowUnsafe\CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
39private static Solution AllowUnsafeOnProject(Project project)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (2)
88public override Solution UpgradeProject(Project project, string newVersion) 104public override bool IsUpgrade(Project project, string newVersion)
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
91var project = propertyDocument.Project;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (17)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (17)
119Project oldProject, 302var oldProject = oldSolution.Projects.Single(); 369var oldProject = oldSolution.Projects.Single(); 396var oldProject = oldSolution.Projects.Single(); 430var oldProject = oldSolution.Projects.Single(); 466var oldProject = oldSolution.Projects.Single(); 512var oldProject = oldSolution.Projects.Single(); 544var oldProject = oldSolution.Projects.Single(); 581var oldProject = oldSolution.Projects.Single(); 620var oldProject = oldSolution.Projects.Single(); 663var oldProject = oldSolution.Projects.Single(); 667var newProject = newSolution.Projects.Single(); 709var oldProject = oldSolution.Projects.Single(); 713var newProject = newSolution.Projects.Single(); 742var oldProject = oldSolution.Projects.Single(); 745var newProject = newSolution.Projects.Single(); 797var oldProject = oldSolution.Projects.Single();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
40var project = document.Project;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (7)
CodeGeneration\AddAttributesTests.cs (1)
27var emptyProject = ws.AddProject(
CodeGeneration\AddImportsTests.cs (2)
31var emptyProject = ws.AddProject( 777var emptyProject = ws.AddProject(
Formatting\FormattingMultipleSpanTests.cs (1)
164var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.CSharp);
Formatting\FormattingTreeEditTests.cs (1)
24var project = ws.AddProject("project", LanguageNames.CSharp);
OrganizeImports\OrganizeUsingsTests.cs (2)
30var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.CSharp); 91var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", LanguageNames.CSharp);
Microsoft.CodeAnalysis.EditorFeatures (20)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (2)
295var oldProject = args.OldSolution.GetProject(args.ProjectId); 296var newProject = args.NewSolution.GetProject(args.ProjectId);
EditorConfigSettings\DataProvider\Analyzer\AnalyzerSettingsProvider.cs (1)
29protected override void UpdateOptions(TieredAnalyzerConfigOptions options, ImmutableArray<Project> projectsInScope)
EditorConfigSettings\DataProvider\NamingStyles\NamingStyleSettingsProvider.cs (1)
26protected override void UpdateOptions(TieredAnalyzerConfigOptions options, ImmutableArray<Project> projectsInScope)
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (2)
36protected abstract void UpdateOptions(TieredAnalyzerConfigOptions options, ImmutableArray<Project> projectsInScope); 56var project = projects.FirstOrDefault();
EditorConfigSettings\Extensions\SolutionExtensions.cs (4)
14public static ImmutableArray<Project> GetProjectsUnderEditorConfigFile(this Solution solution, string pathToEditorConfigFile) 24var builder = ArrayBuilder<Project>.GetInstance(); 25foreach (var project in solution.Projects) 41static bool TryGetFolderContainingProject(Project project, [NotNullWhen(true)] out DirectoryInfo? directoryInfo)
Interactive\InteractiveSession.cs (3)
246var initProject = CreateSubmissionProjectNoLock(solution, initializationScriptProjectId, previousSubmissionProjectId: null, languageName, initializationScriptImports, initializationScriptReferences); 253var newSubmissionProject = CreateSubmissionProjectNoLock(solution, _currentSubmissionProjectId, _lastSuccessfulSubmissionProjectId, languageName, imports, references); 270private Project CreateSubmissionProjectNoLock(Solution solution, ProjectId newSubmissionProjectId, ProjectId? previousSubmissionProjectId, string languageName, ImmutableArray<string> imports, ImmutableArray<MetadataReference> references)
Navigation\AbstractDefinitionLocationService.cs (1)
129Project project, int position, ISymbol symbol, Document originalDocument, CancellationToken cancellationToken)
Preview\AbstractPreviewFactoryService.cs (4)
89var oldProject = projectChanges.OldProject; 90var newProject = projectChanges.NewProject; 199foreach (var project in solutionChanges.GetAddedProjects()) 206foreach (var project in solutionChanges.GetRemovedProjects())
Preview\SolutionPreviewItem.cs (1)
15/// <param name="projectId"><see cref="ProjectId"/> for the <see cref="Project"/> that contains the content being visualized in the supplied <paramref name="lazyPreview"/></param>
SolutionEvents\HostLegacySolutionEventsWorkspaceEventListener.cs (1)
74var project = e.OldSolution.GetProject(projectId) ?? e.NewSolution.GetProject(projectId);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (10)
Completion\AbstractCompletionProviderTests.cs (1)
102internal virtual CompletionService GetCompletionService(Project project)
Diagnostics\GenerateType\GenerateTypeTestState.cs (2)
23public Project ProjectToBeModified { get; } 24public Project TriggeredProject { get; }
Diagnostics\GenerateType\TestGenerateTypeOptionsService.cs (2)
24public Project Project = null; 76Project project = null,
Diagnostics\GenerateType\TestProjectManagementService.cs (1)
29public string GetDefaultNamespace(Project project, Workspace workspace)
Diagnostics\MockDiagnosticAnalyzerService.cs (2)
55public Task ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken) 64public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocuments, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken)
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
27var project = workspace.CurrentSolution.Projects.Single();
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
26var project = workspace.CurrentSolution.Projects.Single();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (6)
Utilities\GoToHelpers\MockSymbolNavigationService.vb (2)
19Public Function GetNavigableLocationAsync(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Task(Of INavigableLocation) Implements ISymbolNavigationService.GetNavigableLocationAsync 24Public Function TrySymbolNavigationNotifyAsync(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Task(Of Boolean) Implements ISymbolNavigationService.TrySymbolNavigationNotifyAsync
Utilities\MockSymbolNavigationServiceProvider.vb (4)
37Public TryNavigateToSymbolProvidedProject As Project 40Public TrySymbolNavigationNotifyProvidedProject As Project 48Public Function GetNavigableLocationAsync(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Task(Of INavigableLocation) Implements ISymbolNavigationService.GetNavigableLocationAsync 56project As Project,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (58)
CodeFixes\CodeFixServiceTests.cs (4)
56var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 294var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 398var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 779var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference);
CodeRefactorings\CodeRefactoringServiceTest.cs (4)
48var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference); 106var project = workspace.CurrentSolution.Projects.Single(); 165var project = workspace.CurrentSolution.Projects.Single() 204var project = workspace.CurrentSolution.Projects.Single()
Completion\CompletionServiceTests.cs (1)
43var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (17)
156var project = workspace.AddProject( 257var project = workspace.AddProject( 301var project = workspace.AddProject( 328var project = workspace.CurrentSolution.Projects.Single(); 339var project = workspace.CurrentSolution.Projects.Single(); 350var project = workspace.CurrentSolution.Projects.Single(); 399private static async Task TestFullSolutionAnalysisForProjectAsync(AdhocWorkspace workspace, Project project, bool expectAnalyzerExecuted) 425var project = workspace.AddProject(projectInfo); 510var project = workspace.CurrentSolution.Projects.Single(); 625var project = workspace.CurrentSolution.Projects.Single(); 703var project = workspace.CurrentSolution.Projects.Single(); 740var project = workspace.CurrentSolution.Projects.Single(); 818var project = workspace.CurrentSolution.Projects.Single(); 861var project = workspace.CurrentSolution.Projects.Single(); 883var project = workspace.AddProject( 1003public override Task<ImmutableArray<Diagnostic>> AnalyzeProjectAsync(Project project, CancellationToken cancellationToken) 1027public override Task<ImmutableArray<Diagnostic>> AnalyzeProjectAsync(Project project, CancellationToken cancellationToken) => SpecializedTasks.Default<ImmutableArray<Diagnostic>>();
FindSymbols\SymbolTreeInfoTests.cs (4)
22var project = solution.Projects.Single(); 43var project = solution.Projects.Single(); 66var project = solution.Projects.Single(); 88var project = solution.Projects.Single();
MetadataAsSource\AbstractMetadataAsSourceTests.cs (2)
77var metadataProject = context.CurrentSolution 92var project = context.DefaultProject.AddMetadataReference(references[0]);
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (4)
80public Project DefaultProject 85public Task<MetadataAsSourceFile> GenerateSourceAsync(ISymbol symbol, Project? project = null, bool signaturesOnly = true) 96Project? project = null, 150public async Task GenerateAndVerifySourceAsync(string symbolMetadataName, string expected, Project? project = null, bool signaturesOnly = true)
Preview\PreviewWorkspaceTests.cs (4)
55var project = solution.AddProject("project", "project.dll", LanguageNames.CSharp); 69var project = solution.AddProject("project", "project.dll", LanguageNames.CSharp); 98var project = solution.AddProject("project", "project.dll", LanguageNames.CSharp); 166var project = previewWorkspace.CurrentSolution.Projects.Single();
SymbolFinder\DependentTypeFinderTests.cs (17)
63var portableProject = GetPortableProject(solution); 104var portableProject = GetPortableProject(solution); 131private static Project GetPortableProject(Solution solution) 134private static Project GetNormalProject(Solution solution) 151var portableProject = GetPortableProject(solution); 196var portableProject = GetPortableProject(solution); 237var portableProject = GetPortableProject(solution); 279var portableProject = GetPortableProject(solution); 321var portableProject = GetPortableProject(solution); 361var portableProject = GetPortableProject(solution); 402var portableProject = GetPortableProject(solution); 640var csProject = solution.Projects.Single(p => p.Language == LanguageNames.CSharp); 641var otherProject = solution.Projects.Single(p => p != csProject); 685var normalProject1 = solution.Projects.Single(); 698var normalProject2 = solution.Projects.Single(p => p != normalProject1); 740var portableProject1 = solution.Projects.Single(p => p.Name == "PortableProject1"); 784var portableProject1 = GetPortableProject(solution);
SymbolKey\SymbolKeyCrossLanguageTests.cs (1)
49var vbProject = solution.Projects.Single(p => p.Language == LanguageNames.VisualBasic);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (9)
InlineDiagnostics\AbstractDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (1)
106var project = document.Project;
InlineDiagnostics\InlineDiagnosticsTaggerProvider.cs (1)
67var project = workspace.CurrentSolution.GetProject(diagnostic.DocumentId.ProjectId);
NavigateTo\NavigateToItemProvider.cs (1)
53foreach (var project in _workspace.CurrentSolution.Projects)
Peek\DefinitionPeekableItem.cs (1)
71var project = solution.GetProject(_peekableItem._projectId);
Peek\IPeekableItemFactory.cs (1)
16Task<IEnumerable<IPeekableItem>> GetPeekableItemsAsync(ISymbol symbol, Project project, IPeekResultFactory peekResultFactory, CancellationToken cancellationToken);
Peek\PeekableItemFactory.cs (2)
49Project project, 69var originatingProject = solution.GetProject(symbol.ContainingAssembly, cancellationToken);
Peek\PeekableItemSource.cs (1)
121IEnumerable<INavigableItem>? navigableItems, Project project,
Suggestions\FixAll\FixMultipleOccurrencesService.cs (1)
45ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsToFix,
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (8)
Compilation\CompilationTests.vb (1)
12Private Shared Function GetProject(snapshot As Solution, assemblyName As String) As Project
Diagnostics\DiagnosticServiceTests.vb (2)
1426Private Shared Async Function TestCompilationAnalyzerWithAnalyzerOptionsCoreAsync(project As Project, expectedDiagnosticMessage As String, diagnosticService As DiagnosticAnalyzerService) As Task 2223Dim project = solution.Projects.Single(Function(p As Project) p.Name = "MainAssembly")
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (1)
686Friend Overrides Function ShouldTriggerCompletion(project As Project,
SyncNamespaces\SyncNamespacesServiceTests.vb (3)
184Dim project = projects.Single(Function(proj As Project) 245Dim project = projects.Single(Function(proj As Project) 250Dim project2 = projects.Single(Function(proj As Project)
Workspaces\TryFindSourceDefinitionTests.vb (1)
17Private Shared Function GetProject(snapshot As Solution, assemblyName As String) As Project
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (1)
Internal\EmbeddedLanguages\AspNetCoreEmbeddedLanguageBraceMatcher.cs (1)
31Project project,
Microsoft.CodeAnalysis.ExternalAccess.Debugger (1)
DebuggerFindReferencesService.cs (1)
27public async Task FindSymbolReferencesAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (3)
Internal\NavigateTo\FSharpNavigateToSearchService.cs (2)
49ImmutableArray<Project> projects, 61foreach (var project in projects)
NavigateTo\IFSharpNavigateToSearchService.cs (1)
17Task<ImmutableArray<FSharpNavigateToSearchResult>> SearchProjectAsync(Project project, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
CodeActions\OmniSharpCodeFixContextFactory.cs (1)
35Project project,
NavigateTo\OmniSharpNavigateToSearchService.cs (1)
17public delegate Task OmniSharpNavigateToCallback(Project project, in OmniSharpNavigateToSearchResult result, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CSharp (1)
DocumentationComments\OmniSharpDocCommentConverter.cs (1)
14public static SyntaxNode ConvertToRegularComments(SyntaxNode node, Project project, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Razor (5)
Cohost\Handlers\Diagnostics.cs (1)
25var project = document.Project;
Cohost\IRazorSemanticTokensRefreshQueue.cs (1)
22Task TryEnqueueRefreshComputationAsync(Project project, CancellationToken cancellationToken);
Cohost\RazorSemanticTokensRefreshQueueWrapper.cs (1)
40public Task TryEnqueueRefreshComputationAsync(Project project, CancellationToken cancellationToken)
RazorProjectExtensions.cs (2)
16internal static ValueTask<GeneratorDriverRunResult?> GetSourceGeneratorRunResultAsync(this Project project, CancellationToken cancellationToken) 21internal static async ValueTask<IEnumerable<SourceGeneratedDocument>> GetSourceGeneratedDocumentsForGeneratorAsync(this Project project, string assemblyName, string assemblyPath, Version assemblyVersion, string typeName, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (5)
External\IDescriptionService.cs (1)
20Task<IEnumerable<TaggedText>> GetDescriptionAsync(ISymbol symbol, Project project, CancellationToken cancellationToken);
External\ILocationService.cs (1)
19Task<FileLinePositionSpan[]> GetSymbolLocationsAsync(ISymbol symbol, Project project, CancellationToken cancellationToken);
Internal\DescriptionService.cs (1)
34public async Task<IEnumerable<TaggedText>> GetDescriptionAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
Internal\LocationService.cs (1)
45public async Task<FileLinePositionSpan[]> GetSymbolLocationsAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
Internal\XamlDiagnosticSource.cs (1)
20Project IDiagnosticSource.GetProject() => document.Project;
Microsoft.CodeAnalysis.Features (369)
AddImport\AbstractAddImportFeatureService.cs (16)
144var project = document.Project; 145var projectToAssembly = new ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>>(concurrencyLevel: 2, capacity: project.Solution.ProjectIds.Count); 166private static bool IsHostOrRemoteWorkspace(Project project) 170ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, 172Project project, 215ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, 216Project project, ConcurrentQueue<Reference> allSymbolReferences, int maxResults, 261Project project, ConcurrentQueue<Reference> allSymbolReferences, int maxResults, SymbolReferenceFinder finder, 321private static ImmutableArray<(Project, PortableExecutableReference)> GetUnreferencedMetadataReferences( 322Project project, HashSet<PortableExecutableReference> seenReferences) 324using var _ = ArrayBuilder<(Project, PortableExecutableReference)>.GetInstance(out var result); 327foreach (var p in solution.Projects) 428private static Compilation CreateCompilation(Project project, PortableExecutableReference reference) 454private static HashSet<Project> GetViableUnreferencedProjects(Project project) 457var viableProjects = new HashSet<Project>(solution.Projects.Where(p => p.SupportsCompilation));
AddImport\AddImportFixData.cs (2)
64/// The optional id for a <see cref="Project"/> we'd like to add a reference to. 75/// is the id for the <see cref="Project"/> we can find that <see cref="PortableExecutableReference"/>
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (4)
41var newProject = newDocument.Project; 63Project newProject) : CodeActionOperation 67private readonly Project _newProject = newProject; 98var newProject = _newProject.WithMetadataReferences(
AddImport\CodeActions\MetadataSymbolReferenceCodeAction.cs (1)
28protected override Task<CodeActionOperation?> UpdateProjectAsync(Project project, bool isPreview, CancellationToken cancellationToken)
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (2)
40protected override Task<CodeActionOperation?> UpdateProjectAsync(Project project, bool isPreview, CancellationToken cancellationToken) 45var projectWithAddedReference = project.AddProjectReference(new ProjectReference(FixData.ProjectReferenceToAdd));
AddImport\CodeActions\SymbolReference.SymbolReferenceCodeAction.cs (1)
61protected abstract Task<CodeActionOperation?> UpdateProjectAsync(Project project, bool isPreview, CancellationToken cancellationToken);
AddImport\References\ProjectSymbolReference.cs (3)
30Project project) : SymbolReference(provider, symbolResult) 32private readonly Project _project = project; 92var project = document.Project;
AddImport\SearchScopes\AllSymbolsProjectSearchScope.cs (1)
21Project project,
AddImport\SearchScopes\MetadataSymbolsSearchScope.cs (2)
17Project assemblyProject, 22private readonly Project _assemblyProject = assemblyProject;
AddImport\SearchScopes\ProjectSearchScope.cs (2)
13protected readonly Project _project; 17Project project,
AddImport\SearchScopes\SourceSymbolsProjectSearchScope.cs (4)
24ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> projectToAssembly, 25Project project, bool ignoreCase) : ProjectSearchScope(provider, project, ignoreCase) 27private readonly ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> _projectToAssembly = projectToAssembly; 50static AsyncLazy<IAssemblySymbol?> CreateLazyAssembly(Project project)
AddImport\SymbolReferenceFinder.cs (3)
98internal Task<ImmutableArray<SymbolReference>> FindInSourceSymbolsInProjectAsync(ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, Project project, bool exact, CancellationToken cancellationToken) 101internal Task<ImmutableArray<SymbolReference>> FindInMetadataSymbolsAsync(IAssemblySymbol assembly, Project assemblyProject, PortableExecutableReference metadataReference, bool exact, CancellationToken cancellationToken)
AddImport\SymbolReferenceFinder_PackageAssemblySearch.cs (2)
134var project = _document.Project; 176Project project,
AddMissingReference\AddMissingReferenceCodeAction.cs (3)
15internal sealed class AddMissingReferenceCodeAction(Project project, string title, ProjectReference? projectReferenceToAdd, AssemblyIdentity missingAssemblyIdentity) : CodeAction 17private readonly Project _project = project; 29public static async Task<CodeAction> CreateAsync(Project project, AssemblyIdentity missingAssemblyIdentity, CancellationToken cancellationToken)
BraceMatching\IEmbeddedLanguageBraceMatcher.cs (1)
13Project project,
ChangeSignature\DelegateInvokeMethodReferenceFinder.cs (2)
53foreach (var project in solution.Projects) 70Project project,
CodeFixes\Configuration\ConfigurationUpdater.cs (14)
70private readonly Project _project; 82Project project, 110Project project, 129Project project, 160Project project, 174Project project, 183Project project, 202Project project, 213Project project, 231var currentProject = project; 307var project = currentSolution.GetProject(projectId); 322private static AnalyzerConfigDocument? GetOrCreateAnalyzerConfigDocument(Project project, string analyzerConfigPath) 342Project project) 383internal static ImmutableArray<IOption2> GetCodeStyleOptionsForDiagnostic(Diagnostic diagnostic, Project project)
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (2)
59public Task<ImmutableArray<CodeFix>> GetFixesAsync(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 62private static ImmutableArray<CodeFix> GetConfigurations(Project project, IEnumerable<Diagnostic> diagnostics)
CodeFixes\Configuration\ConfigureSeverity\ConfigureSeverityLevelCodeFixProvider.cs (2)
50public Task<ImmutableArray<CodeFix>> GetFixesAsync(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 53private static ImmutableArray<CodeFix> GetConfigurations(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\IFixMultipleOccurrencesService.cs (1)
37ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsToFix,
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (2)
135ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectsAndDiagnosticsToFixMap, 200Project project, ImmutableArray<Diagnostic> diagnostics,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (2)
23private readonly Project _project; 25protected AbstractGlobalSuppressMessageCodeAction(AbstractSuppressionCodeFixProvider fixer, Project project)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (2)
172Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 188Document documentOpt, Project project, IEnumerable<Diagnostic> diagnostics, SuppressionTargetInfo suppressionTargetInfo, bool skipSuppressMessage, bool skipUnsuppress, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs (1)
20Project project, Diagnostic diagnostic,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (9)
34Project project) 48internal static CodeAction Create(string title, AbstractSuppressionCodeFixProvider fixer, Project triggerProject, ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject) 76var oldProject = grouping.Key; 77var currentProject = currentSolution.GetProject(oldProject.Id); 98Project triggerProject, 99ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject, 105var currentProject = currentSolution.GetProject(oldProject.Id); 173private static async Task<IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>>> CreateDiagnosticsBySymbolAsync(Project project, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (1)
85Project project, ImmutableArray<Diagnostic> diagnostics,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.cs (1)
27Project project,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Attribute.cs (3)
23private readonly Project _project; 28Project project, 37Project project,
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
127var newProject = document.Project;
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (1)
118var projectToBeUpdated = document.Project;
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
159public static FolderInfo CreateFolderHierarchyForProject(Project project)
Common\AbstractProjectExtensionProvider.cs (1)
47public static ImmutableArray<TExtension> GetExtensions(Project? project)
Completion\CompletionService.cs (6)
127/// We pass the project here to retrieve information about the <see cref="Project.AnalyzerReferences"/>, 128/// <see cref="WorkspaceKind"/> and <see cref="Project.Language"/> which are fast operations. 132Project? project, 390internal void TriggerLoadProjectProviders(Project project, CompletionOptions options) 393internal CompletionProvider? GetProvider(CompletionItem item, Project? project) 406public ImmutableArray<CompletionProvider> GetProjectProviders(Project project)
Completion\CompletionService.ProviderManager.cs (4)
96public ImmutableArray<CompletionProvider> GetCachedProjectCompletionProvidersOrQueueLoadInBackground(Project? project, CompletionOptions options) 151public CompletionProvider? GetProvider(CompletionItem item, Project? project) 167Project? project, ImmutableHashSet<string>? roles, CompletionTrigger trigger, in CompletionOptions options) 288public ImmutableArray<CompletionProvider> GetProjectProviders(Project project)
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (5)
135var currentProject = context.Document.Project; 137foreach (var project in context.Document.Project.Solution.Projects) 171private static bool IsProjectTypeUnsupported(Project project) 179var project = completionContext.Document.Project; 284private static async Task<string> GetPublicKeyOfProjectAsync(Project project, CancellationToken cancellationToken)
Completion\Providers\CompletionUtilities.cs (2)
28public static ImmutableArray<Project> GetDistinctProjectsFromLatestSolutionSnapshot(ImmutableSegmentedList<Project> projects)
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionCacheServiceFactory.cs (5)
25private readonly Func<ImmutableSegmentedList<Project>, CancellationToken, ValueTask> _processBatchAsync; 30Func<ImmutableSegmentedList<Project>, CancellationToken, ValueTask> processBatchAsync 50var workQueue = new AsyncBatchingWorkQueue<Project>( 69AsyncBatchingWorkQueue<Project> workQueue) : IImportCompletionCacheService<TProjectCacheEntry, TMetadataCacheEntry> 75public AsyncBatchingWorkQueue<Project> WorkQueue { get; } = workQueue;
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (6)
39public void QueueCacheWarmUpTask(Project project) 67private async Task<(ImmutableArray<TypeImportCompletionCacheEntry> results, bool isPartial)> GetCacheEntriesAsync(Project currentProject, Compilation originCompilation, bool forceCacheCreation, CancellationToken cancellationToken) 73using var _2 = ArrayBuilder<Project>.GetInstance(out var projectsBuilder); 141public static async ValueTask BatchUpdateCacheAsync(ImmutableSegmentedList<Project> projects, CancellationToken cancellationToken) 144foreach (var project in latestProjects) 164private async Task<TypeImportCompletionCacheEntry> GetUpToDateCacheForProjectAsync(Project project, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (6)
28public static async Task WarmUpCacheAsync(Project project, CancellationToken cancellationToken) 45public static void WarmUpCacheInCurrentProcess(Project project) 60var project = document.Project; 133public static async ValueTask BatchUpdateCacheAsync(ImmutableSegmentedList<Project> projects, CancellationToken cancellationToken) 136foreach (var project in latestProjects) 249Project project,
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (8)
60private static IImportCompletionCacheService<ExtensionMethodImportCompletionCacheEntry, object> GetCacheService(Project project) 69public static void QueueCacheWarmUpTask(Project project) 74public static async ValueTask UpdateCacheAsync(Project project, CancellationToken cancellationToken) 79foreach (var relevantProject in GetAllRelevantProjects(project)) 142private static ImmutableArray<Project> GetAllRelevantProjects(Project project) 150private static ImmutableArray<PortableExecutableReference> GetAllRelevantPeReferences(Project project) 154Project project,
Completion\Providers\ImportCompletionProvider\IImportCompletionCacheService.cs (1)
18AsyncBatchingWorkQueue<Project> WorkQueue { get; }
Completion\Providers\ImportCompletionProvider\ITypeImportCompletionService.cs (1)
30void QueueCacheWarmUpTask(Project project);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (4)
436Project startingProject, INamedTypeSymbol tupleType, CancellationToken cancellationToken) 461var allProjects = dependentProjects.Select<ProjectId, Project>(solution.GetRequiredProject) 478Project project, INamedTypeSymbol tupleType, CancellationToken cancellationToken) 489private static async Task AddDocumentsToUpdateForProjectAsync(Project project, ArrayBuilder<DocumentToUpdate> result, ImmutableArray<string> tupleFieldNames, CancellationToken cancellationToken)
DesignerAttribute\DesignerAttributeDiscoveryService.cs (6)
62private static async ValueTask<bool> HasDesignerCategoryTypeAsync(Project project, CancellationToken cancellationToken) 177Project project, 197Project project, 221Project project, 267Project project, DocumentId documentId, string filePath, bool hasDesignerCategoryType, string? existingCategory) 285bool hasDesignerCategoryType, Project project, DocumentId documentId, string? existingCategory, CancellationToken cancellationToken)
Diagnostics\CodeAnalysisDiagnosticAnalyzerService.cs (4)
93public async Task RunAnalysisAsync(Solution solution, ProjectId? projectId, Action<Project> onAfterProjectAnalyzed, CancellationToken cancellationToken) 99var project = solution.GetProject(projectId); 115private async ValueTask AnalyzeProjectCoreAsync(Project project, Action<Project> onAfterProjectAnalyzed, CancellationToken cancellationToken)
Diagnostics\ICodeAnalysisDiagnosticAnalyzerService.cs (4)
23Task RunAnalysisAsync(Solution solution, ProjectId? projectId, Action<Project> onAfterProjectAnalyzed, CancellationToken cancellationToken); 26/// Returns true if <see cref="RunAnalysisAsync(Solution, ProjectId?, Action{Project}, CancellationToken)"/> was invoked 36/// <see cref="RunAnalysisAsync(Solution, ProjectId?, Action{Project}, CancellationToken)"/> invocation on the containing project or solution. 46/// <see cref="RunAnalysisAsync(Solution, ProjectId?, Action{Project}, CancellationToken)"/> invocation on the given project or solution.
Diagnostics\IDiagnosticAnalyzerService.cs (2)
54Task ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken); 79Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocumentIds, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
514Project oldProject,
EditAndContinue\CommittedSolution.cs (4)
121public Project? GetProject(ProjectId id) 124public Project GetRequiredProject(ProjectId id) 348IEnumerable<(Project, IEnumerable<CodeAnalysis.DocumentState>)> documentsByProject, 349Func<Project, CompilationOutputs> compilationOutputsProvider,
EditAndContinue\DebuggingSession.cs (9)
33private readonly Func<Project, CompilationOutputs> _compilationOutputsProvider; 102Func<Project, CompilationOutputs> compilationOutputsProvider, 223internal CompilationOutputs GetCompilationOutputs(Project project) 241internal Task<(Guid Mvid, Diagnostic? Error)> GetProjectModuleIdAsync(Project project, CancellationToken cancellationToken) 276Project baselineProject, 419var project = document.Project; 680var oldProject = LastCommittedSolution.GetProject(projectId); 795var newProject = mappedDocument.Project; 797var oldProject = LastCommittedSolution.GetProject(newProject.Id);
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (3)
27private readonly Dictionary<DocumentId, (AsyncLazy<DocumentAnalysisResults> results, Project baseProject, Document document, ImmutableArray<ActiveStatementLineSpan> activeStatementSpans)> _analyses = []; 79var oldProject = oldDocument?.Project ?? oldSolution.GetRequiredProject(newDocument.Project.Id); 163private AsyncLazy<DocumentAnalysisResults> GetDocumentAnalysisNoLock(Project baseProject, Document document, ImmutableArray<ActiveStatementLineSpan> activeStatementSpans)
EditAndContinue\EditAndContinueService.cs (4)
51private Func<Project, CompilationOutputs> _compilationOutputsProvider; 103private static CompilationOutputs GetCompilationOutputs(Project project) 184private static IEnumerable<(Project, IEnumerable<DocumentState>)> GetDocumentStatesGroupedByProject(Solution solution, ImmutableArray<DocumentId> documentIds) 290public void SetOutputProvider(Func<Project, CompilationOutputs> value)
EditAndContinue\EditSession.cs (21)
151public async Task<ImmutableArray<Diagnostic>?> GetModuleDiagnosticsAsync(Guid mvid, Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, CancellationToken cancellationToken) 179private static async IAsyncEnumerable<Location> CreateChangedLocationsAsync(Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, [EnumeratorCancellation] CancellationToken cancellationToken) 289foreach (var newProject in newSolution.Projects) 296var oldProject = oldSolution.GetProject(newProject.Id); 304foreach (var oldProject in oldSolution.Projects) 311var newProject = newSolution.GetProject(oldProject.Id); 338internal static async ValueTask<bool> HasChangedOrAddedDocumentsAsync(Project oldProject, Project newProject, ArrayBuilder<Document>? changedOrAddedDocuments, CancellationToken cancellationToken) 426internal static async Task PopulateChangedAndAddedDocumentsAsync(Project oldProject, Project newProject, ArrayBuilder<Document> changedOrAddedDocuments, ArrayBuilder<ProjectDiagnostics> diagnostics, CancellationToken cancellationToken) 464private static async ValueTask<TextDocumentStates<SourceGeneratedDocumentState>> GetSourceGeneratedDocumentStatesAsync(Project project, ArrayBuilder<ProjectDiagnostics>? diagnostics, CancellationToken cancellationToken) 484internal static async IAsyncEnumerable<DocumentId> GetChangedDocumentsAsync(Project oldProject, Project newProject, [EnumeratorCancellation] CancellationToken cancellationToken) 613Project oldProject, 614Project newProject, 819foreach (var newProject in solution.Projects) 826var oldProject = oldSolution.GetProject(newProject.Id); 1154private async ValueTask LogDeltaFilesAsync(TraceLog.FileLogger log, ManagedHotReloadUpdate delta, int baselineGeneration, Project oldProject, Project newProject, CancellationToken cancellationToken)
EditAndContinue\IEditAndContinueAnalyzer.cs (1)
17Project baseProject,
EditAndContinue\Utilities\Extensions.cs (1)
43public static bool SupportsEditAndContinue(this Project project, TraceLog? log = null)
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (4)
41var project = document.Project; 52SolutionServices services, Project? project, SemanticModel semanticModel, ImmutableArray<TextSpan> textSpans, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 68Project project, 77private readonly Project _project = project;
EmbeddedLanguages\Classification\EmbeddedLanguageClassifierContext.cs (2)
24public Project Project { get; } 43Project project,
EmbeddedLanguages\Json\LanguageServices\JsonBraceMatcher.cs (1)
36Project project,
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexBraceMatcher.cs (1)
39Project project,
ExternalAccess\UnitTesting\API\INewUnitTestingIncrementalAnalyzerImplementation.cs (1)
18Project project,
ExternalAccess\UnitTesting\API\NewUnitTestingIncrementalAnalyzer.cs (1)
29Project project,
ExternalAccess\UnitTesting\API\UnitTestingSearchHelpers.cs (5)
26Project project, UnitTestingSearchQuery query, CancellationToken cancellationToken) 49Project project, UnitTestingSearchQuery query, CancellationToken cancellationToken) 141Project project, 153Project project, 166Project project,
ExternalAccess\UnitTesting\SolutionCrawler\IUnitTestingIncrementalAnalyzer.cs (1)
21Project project,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (14)
226foreach (var addedProject in solutionChanges.GetAddedProjects()) 236foreach (var removedProject in solutionChanges.GetRemovedProjects()) 331private async Task EnqueueDocumentWorkItemAsync(Project project, DocumentId documentId, TextDocument? document, UnitTestingInvocationReasons invocationReasons, SyntaxNode? changedMember = null) 356private static Document GetRequiredDocument(Project project, DocumentId documentId, Document? document) 371private async Task EnqueueFullProjectWorkItemAsync(Project project, UnitTestingInvocationReasons invocationReasons) 402IUnitTestingIncrementalAnalyzer analyzer, Project project, DocumentId documentId, Document? document, UnitTestingInvocationReasons invocationReasons) 432var oldProject = projectChanges.OldProject; 433var newProject = projectChanges.NewProject; 573var project = solution.GetProject(projectId); 621var project = solution.GetProject(projectId); 639public IEnumerable<(Project project, DocumentId documentId)> GetDocumentIds(Solution solution) 648foreach (var project in solution.Projects) 665var project = solution.GetProject(projectId); 676var project = solution.GetProject(documentId.ProjectId);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (7)
209private void EnqueueFullProjectDependency(Project project, IAssemblySymbol? internalVisibleToAssembly = null) 226var otherProject = solution.GetProject(projectId); 243public void Enqueue(Project project, DocumentId documentId, Document? document, SyntaxPath? changedMember) 308private readonly struct UnitTestingData(Project project, DocumentId documentId, Document? document, SyntaxPath? changedMember, IAsyncToken asyncToken) 313public readonly Project Project = project; 382public async Task EnqueueWorkItemAsync(Project project, DocumentId documentId, Document? document) 430private async Task EnqueueWorkItemAsync(Project? project)
ExternalAccess\VSTypeScript\Api\IVSTypeScriptDiagnosticAnalyzerImplementation.cs (1)
13Task<ImmutableArray<Diagnostic>> AnalyzeProjectAsync(Project project, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptNavigateToSearchService.cs (1)
16Task<ImmutableArray<IVSTypeScriptNavigateToSearchResult>> SearchProjectAsync(Project project, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (4)
51ImmutableArray<Project> projects, 63using var _ = PooledHashSet<Project>.GetInstance(out var processedProjects); 68foreach (var project in projects) 73async Task ProcessProjectAsync(Project project)
ExternalAccess\VSTypeScript\VSTypeScriptProjectDiagnosticAnalyzer.cs (1)
18public override Task<ImmutableArray<Diagnostic>> AnalyzeProjectAsync(Project project, CancellationToken cancellationToken)
FindUsages\AbstractFindUsagesService_FindImplementations.cs (2)
42IFindUsagesContext context, ISymbol symbol, Project project, OptionsProvider<ClassificationOptions> classificationOptions, CancellationToken cancellationToken) 69ISymbol symbol, Project project, IFindUsagesContext context, OptionsProvider<ClassificationOptions> classificationOptions, CancellationToken cancellationToken)
FindUsages\AbstractFindUsagesService_FindReferences.cs (3)
108IFindUsagesContext context, ISymbol symbol, Project project, OptionsProvider<ClassificationOptions> classificationOptions, CancellationToken cancellationToken) 127Project project, 159Project project,
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (2)
61private async ValueTask<(Project? project, ISymbol? symbol)> TryResolveSymbolAsync(Solution solution, string symbolKey, CancellationToken cancellationToken) 69var project = solution.GetProject(ProjectId.CreateFromSerialized(Guid.Parse(projectIdGuid), projectDebugName));
FindUsages\FindUsagesHelpers.cs (1)
31public static async Task<(ISymbol symbol, Project project)?> GetRelevantSymbolAndProjectAtPositionAsync(
FullyQualify\AbstractFullyQualifyService.cs (1)
63var project = document.Project;
GenerateType\AbstractGenerateTypeService.CodeAction.cs (1)
117private bool IsPublicOnlyAccessibility(State state, Project project)
GenerateType\AbstractGenerateTypeService.cs (1)
54internal abstract bool IsPublicOnlyAccessibility(TExpressionSyntax expression, Project project);
GenerateType\AbstractGenerateTypeService.Editor.cs (11)
179private string GetNamespaceToGenerateIntoForUsageWithNamespace(Project targetProject, Project triggeringProject) 267Project projectToBeUpdated, 268Project triggeringProject, 338Project projectToBeUpdated, 339Project triggeringProject, 373private static Solution AddProjectReference(Project projectToBeUpdated, Project triggeringProject, Solution updatedSolution) 405Project triggeringProject, 469Project targetProject, 470Project triggeringProject)
GenerateType\GenerateTypeOptionsResult.cs (2)
21public Project Project { get; } 32Project project,
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (3)
18protected abstract Task<ISymbol> FindRelatedExplicitlyDeclaredSymbolAsync(Project project, ISymbol symbol, CancellationToken cancellationToken); 22public async Task<(ISymbol? symbol, Project project, TextSpan boundSpan)> GetSymbolProjectAndBoundSpanAsync( 25var project = document.Project;
GoToDefinition\IGoToDefinitionSymbolService.cs (1)
14Task<(ISymbol? symbol, Project project, TextSpan boundSpan)> GetSymbolProjectAndBoundSpanAsync(
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (3)
44Project project, 76private async ValueTask<(Project remapped, SymbolAndLineNumberArray symbolAndLineNumbers)> GetMemberSymbolsAsync( 91Project? project = null;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (4)
65Project sourceProject, 334public Project? MapDocument(Document document) 345var project = solution.GetProject(fileInfo.SourceProjectId); 366private static async Task<UniqueDocumentKey> GetUniqueDocumentKeyAsync(Project project, INamedTypeSymbol topLevelNamedType, bool signaturesOnly, CancellationToken cancellationToken)
MetadataAsSource\IMetadataAsSourceFileProvider.cs (2)
23Project sourceProject, 57Project? MapDocument(Document document);
MetadataAsSource\IMetadataAsSourceFileService.cs (1)
29Project sourceProject,
MetadataAsSource\MetadataAsSourceFileService.cs (2)
71Project sourceProject, 250Project? project = null;
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
28public MetadataAsSourceGeneratedFileInfo(string rootPath, Workspace sourceWorkspace, Project sourceProject, INamedTypeSymbol topLevelNamedType, bool signaturesOnly)
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
59ImmutableArray<Project> projects,
NavigateTo\AbstractNavigateToSearchService.GeneratedDocumentSearch.cs (3)
21ImmutableArray<Project> projects, 60ImmutableArray<Project> projects, 75Project project, Action<RoslynNavigateToItem> onItemFound, VoidResult _, CancellationToken cancellationToken)
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (3)
67ImmutableArray<Project> projects, 108ImmutableArray<Project> projects, 133Project project,
NavigateTo\INavigateToSearcherHost.cs (2)
21INavigateToSearchService? GetNavigateToSearchService(Project project); 52public INavigateToSearchService? GetNavigateToSearchService(Project project)
NavigateTo\INavigateToSearchService.cs (3)
37ImmutableArray<Project> projects, 64ImmutableArray<Project> projects, 83ImmutableArray<Project> projects,
NavigateTo\NavigateToSearcher.cs (21)
188var project = _activeDocument.Project; 205var activeProject = _activeDocument.Project; 216private INavigateToSearchService GetNavigateToSearchService(Project project) 231ImmutableArray<ImmutableArray<Project>> orderedProjects, 283private ImmutableArray<ImmutableArray<Project>> GetOrderedProjectsToProcess() 285using var result = TemporaryArray<ImmutableArray<Project>>.Empty; 287using var _ = PooledHashSet<Project>.GetInstance(out var processedProjects); 298using var buffer = TemporaryArray<Project>.Empty; 309foreach (var project in _solution.Projects) 326private ImmutableArray<Document> GetPriorityDocuments(ImmutableArray<Project> projects) 328using var _1 = PooledHashSet<Project>.GetInstance(out var projectsSet); 347ImmutableArray<ImmutableArray<Project>> orderedProjects, 349Func<INavigateToSearchService, ImmutableArray<Project>, Func<ImmutableArray<INavigateToSearchResult>, Task>, Func<Task>, Task> processProjectAsync, 378async ValueTask SearchCoreAsync(IGrouping<INavigateToSearchService, Project> grouping, CancellationToken cancellationToken) 412ImmutableArray<ImmutableArray<Project>> orderedProjects, 430ImmutableArray<ImmutableArray<Project>> orderedProjects, 448foreach (var project in projects) 462ImmutableArray<ImmutableArray<Project>> orderedProjects, 505foreach (var project in projects) 534public async Task SearchProjectsAsync(Solution solution, ImmutableArray<Project> projects, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken) 536foreach (var _ in projects)
NavigateTo\NavigateToUtilities.cs (1)
19foreach (var project in solution.Projects)
NavigateTo\RoslynNavigateToItem.cs (1)
143var firstProject = itemDocument.Project;
Navigation\DefaultSymbolNavigationService.cs (2)
15public Task<INavigableLocation?> GetNavigableLocationAsync(ISymbol symbol, Project project, CancellationToken cancellationToken) 18public Task<bool> TrySymbolNavigationNotifyAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
Navigation\INavigableItem.cs (1)
92public static NavigableProject FromProject(Project project)
Navigation\ISymbolNavigationService.cs (2)
22Task<INavigableLocation?> GetNavigableLocationAsync(ISymbol symbol, Project project, CancellationToken cancellationToken); 26Task<bool> TrySymbolNavigationNotifyAsync(ISymbol symbol, Project project, CancellationToken cancellationToken);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (4)
82Project sourceProject, 307private ProjectInfo? CreateProjectInfo(Workspace workspace, Project project, ImmutableDictionary<string, string> pdbCompilationOptions, string assemblyName, string assemblyVersion, SourceHashAlgorithm checksumAlgorithm) 339SourceFileInfo?[] sourceFileInfos, Encoding encoding, ProjectId projectId, Workspace sourceWorkspace, Project sourceProject) 431public Project? MapDocument(Document document)
ProjectManagement\IProjectManagementService.cs (1)
21string GetDefaultNamespace(Project project, Workspace workspace);
RelatedDocuments\AbstractRelatedDocumentsService.cs (1)
42var project = document.Project;
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
161var project = document.Project;
SemanticSearch\SemanticSearchUtilities.cs (1)
72public static Project GetQueryProject(Solution solution)
Shared\Extensions\ProjectExtensions.cs (1)
11public static Glyph GetGlyph(this Project project)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (4)
22Project project, 36Compilation compilation, ISet<string> availableTypeParameterNames, Project project, CancellationToken cancellationToken) : AsyncSymbolVisitor 42private readonly Project _project = project; 126INamedTypeSymbol constraintType, IImmutableSet<Project> projects)
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
138[methodSymbol], document.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
55foreach (var project in fixAllContext.Solution.Projects)
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (4)
22public abstract Solution UpgradeProject(Project project, string version); 23public abstract bool IsUpgrade(Project project, string newVersion); 43var project = context.Document.Project; 93private bool CanUpgrade(Project project, string language, string version)
StackTraceExplorer\AbstractStackTraceSymbolResolver.cs (1)
16Project project,
StackTraceExplorer\StackFrameLocalMethodResolver.cs (1)
18Project project,
StackTraceExplorer\StackFrameMethodSymbolResolver.cs (1)
15public override Task<IMethodSymbol?> TryGetBestMatchAsync(Project project,
StackTraceExplorer\StackTraceExplorerService.cs (1)
92foreach (var project in solution.Projects)
StackTraceExplorer\StackTraceExplorerUtilities.cs (3)
47using var _ = PooledObjects.ArrayBuilder<Project>.GetInstance(out var candidateProjects); 48foreach (var project in solution.Projects) 108private static async Task<IMethodSymbol?> TryGetBestMatchAsync(Project project, string fullyQualifiedTypeName, StackFrameSimpleNameNode methodNode, StackFrameParameterList methodArguments, StackFrameTypeArgumentList? methodTypeArguments, CancellationToken cancellationToken)
SymbolMapping\SymbolMappingResult.cs (2)
11public Project Project { get; } 14internal SymbolMappingResult(Project project, ISymbol symbol)
SyncNamespaces\AbstractSyncNamespacesService.cs (11)
33ImmutableArray<Project> projects, 58private static async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetDiagnosticsByProjectAsync( 59ImmutableArray<Project> projects, 64var builder = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>(); 66foreach (var project in projects) 76Project project, 98ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject, 156private readonly ImmutableDictionary<Project, ImmutableArray<Diagnostic>> _diagnosticsByProject; 158internal DiagnosticProvider(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsByProject) 163public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 176public override Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
SyncNamespaces\ISyncNamespacesService.cs (1)
21ImmutableArray<Project> projects, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken);
Tagging\CompilationAvailableHelpers.cs (1)
15public static Task ComputeCompilationInCurrentProcessAsync(Project project, CancellationToken cancellationToken)
UnusedReferences\UnusedReferencesRemover.cs (1)
36foreach (var project in projects)
Workspace\CompileTimeSolutionProvider.cs (1)
131var existingStaleProject = staleSolution.GetProject(projectState.Id);
Microsoft.CodeAnalysis.Features.Test.Utilities (21)
Diagnostics\DiagnosticProviderTestUtilities.cs (1)
39Project project,
Diagnostics\TestDiagnosticAnalyzerDriver.cs (3)
39Project project, 83public async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project) 101public Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project)
EditAndContinue\EditAndContinueTestVerifier.cs (5)
116CreateProjects(editScripts, workspace, targetFramework, out var oldProject, out var newProject); 434private void CreateProjects(EditScriptDescription[] editScripts, AdhocWorkspace workspace, TargetFramework targetFramework, out Project oldProject, out Project newProject) 525foreach (var project in solution.Projects)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (5)
45private protected Func<Project, CompilationOutputs> _mockCompilationOutputsProvider = _ => new MockCompilationOutputs(Guid.NewGuid()); 95internal static Project AddEmptyTestProject(Solution solution) 109var project = AddEmptyTestProject(solution); 251Project? generatorProject = null, 265Project? generatorProject = null,
EditAndContinue\Extensions.cs (5)
55public static Project AddTestProject(this Solution solution, string projectName, string language = LanguageNames.CSharp) 58public static Project AddTestProject(this Solution solution, string projectName, out ProjectId id) 61public static Project AddTestProject(this Solution solution, string projectName, string language, out ProjectId id) 67public static Document AddTestDocument(this Project project, string source, string path) 70public static Document AddTestDocument(this Project project, string source, string path, out DocumentId id)
Snippets\AbstractSnippetProviderTests.cs (2)
35var project = workspace.CurrentSolution. 118var project = workspace.CurrentSolution.
Microsoft.CodeAnalysis.Features.UnitTests (46)
EditAndContinue\ActiveStatementsMapTests.cs (3)
120var project = solution.Projects.Single(); 175var project = solution.Projects.Single(); 226var project = solution.Projects.Single();
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (5)
234var project = solution.AddProject("dummy_proj", "dummy_proj", NoCompilationConstants.LanguageName); 572var project = document1.Project; 763var project = solution. 1141var project = AddEmptyTestProject(solution); 1557var projectC = solution.GetProjectsByName("C").Single();
EditAndContinue\EditSessionActiveStatementsTests.cs (5)
44var mockCompilationOutputsProvider = new Func<Project, CompilationOutputs>(_ => new MockCompilationOutputs(Guid.NewGuid())); 68var project = solution 175var dummyProject = solution.AddProject("dummy_proj", "dummy_proj", NoCompilationConstants.LanguageName); 177var project = solution.GetProject(projectId); 653var project = solution.Projects.Single();
FindUsages\DefinitionItemFactoryTests.cs (33)
82Project project, 94expressionMap.Add(project.Id.Id.ToString(), $"project.{nameof(Project.Id)}.{nameof(Project.Id.Id)}.{nameof(Project.Id.Id.ToString)}()"); 131var project = solution.Projects.Single(); 167var project = solution.Projects.Single(); 209var project = solution.Projects.Single(); 245var project = solution.Projects.Single(); 287var project = solution.Projects.Single(); 329var project = solution.Projects.Single(); 382var project = solution.Projects.Single(); 436var project = solution.Projects.Single(); 476var project = solution.Projects.Single(); 516var project = solution.Projects.Single(); 558var project = solution.Projects.Single(); 616var project = solution.Projects.Single(p => p.Name == "P1"); 662var project = solution.Projects.Single(); 699var project = solution.Projects.Single(); 761var project = solution.Projects.Single(); 817var project = solution.Projects.Single(); 871var project = solution.Projects.Single(); 926var project = solution.Projects.Single(); 976var project = solution.Projects.Single(); 1031var project = solution.Projects.Single(); 1083var project = solution.Projects.Single(); 1145var project = solution.Projects.Single(); 1202var project = solution.Projects.Single(); 1259var project = solution.Projects.Single(); 1331var project = solution.Projects.Single(); 1391var project = solution.Projects.Single(); 1443var project = solution.Projects.Single(); 1506var project = solution.Projects.Single(); 1577var project = solution.Projects.Single();
Microsoft.CodeAnalysis.LanguageServer (3)
LanguageServer\Handler\DebugConfiguration\WorkspaceDebugConfigurationHandler.cs (3)
41private static bool IsProjectInWorkspace(Uri workspacePath, Project project) 46private ProjectDebugConfiguration GetProjectDebugConfiguration(Project project) 53private static string GetProjectName(Project project)
Microsoft.CodeAnalysis.LanguageServer.Protocol (131)
Extensions\Extensions.cs (1)
165public static Project? GetProject(this Solution solution, TextDocumentIdentifier projectIdentifier)
Extensions\ProtocolConversions.cs (1)
813public static LSP.VSProjectContext ProjectToProjectContext(Project project)
Extensions\ProtocolConversions.Diagnostics.cs (2)
29public static ImmutableArray<LSP.Diagnostic> ConvertDiagnostic(DiagnosticData diagnosticData, bool supportsVisualStudioExtensions, Project project, bool isLiveSource, bool potentialDuplicate, IGlobalOptionService globalOptionService) 96Project project,
ExternalAccess\Razor\FormatNewFileHandler.cs (1)
67var project = document.Project;
ExternalAccess\Razor\FormatNewFileParams.cs (1)
16public required TextDocumentIdentifier Project { get; init; }
Features\CodeFixes\CodeFixService.FixAllDiagnosticProvider.cs (2)
62public override async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 69public override async Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
Features\CodeFixes\CodeFixService.FixAllPredefinedDiagnosticProvider.cs (2)
24public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 30public override Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
Features\Diagnostics\DiagnosticAnalyzerService.cs (2)
107public async Task ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken) 114Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocuments, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken)
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
199private async Task<ImmutableArray<Diagnostic>> GetSourceGeneratorDiagnosticsAsync(Project project, CancellationToken cancellationToken)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (5)
132Project project, 203private static void AssertCompilation(Project project, Compilation compilation1) 214public static bool IsAnalyzerEnabledForProject(DiagnosticAnalyzer analyzer, Project project, IGlobalOptionService globalOptions) 284Project project, 319private static async Task VerifyDiagnosticLocationsAsync(ImmutableArray<Diagnostic> diagnostics, Project project, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.AnalysisData.cs (1)
112public static async Task<ProjectAnalysisData> CreateAsync(Project project, IEnumerable<StateSet> stateSets, bool avoidLoadingData, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (1)
13private static Task<CompilationWithAnalyzersPair?> CreateCompilationWithAnalyzersAsync(Project project, ImmutableArray<StateSet> stateSets, bool includeSuppressedDiagnostics, bool crashOnAnalyzerException, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (3)
69public static Task<VersionStamp> GetDiagnosticVersionAsync(Project project, CancellationToken cancellationToken) 82internal async Task<IEnumerable<DiagnosticAnalyzer>> GetAnalyzersTestOnlyAsync(Project project, CancellationToken cancellationToken) 89private static string GetProjectLogMessage(Project project, ImmutableArray<StateSet> stateSets)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (6)
26CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<StateSet> stateSets, CancellationToken cancellationToken) 57ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> result, Project project, CancellationToken cancellationToken) 92CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<DiagnosticAnalyzer> ideAnalyzers, CancellationToken cancellationToken) 123CompilationWithAnalyzersPair? compilationWithAnalyzers, Project project, ImmutableArray<StateSet> stateSets, 237Project project, 298Project project,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.InProcOrRemoteHostAnalyzerRunner.cs (7)
51Project project, 61Project project, 91public async Task<ImmutableArray<Diagnostic>> GetSourceGeneratorDiagnosticsAsync(Project project, CancellationToken cancellationToken) 116Project project, 162Project project, 196Project project, 264private static ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> Hydrate(ImmutableArray<(DocumentId documentId, ImmutableArray<DiagnosticData> diagnostics)> diagnosticByDocument, Project project)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectAnalyzerReferenceChangedEventArgs.cs (2)
20public readonly Project Project; 24public ProjectAnalyzerReferenceChangedEventArgs(Project project, ImmutableArray<StateSet> added, ImmutableArray<StateSet> removed)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (13)
57public async Task<DiagnosticAnalysisResult> GetAnalysisDataAsync(Project project, bool avoidLoadingData, CancellationToken cancellationToken) 159public async Task<DiagnosticAnalysisResult> GetProjectAnalysisDataAsync(Project project, bool avoidLoadingData, CancellationToken cancellationToken) 195public async ValueTask SaveToInMemoryStorageAsync(Project project, DiagnosticAnalysisResult result) 260var project = document.Project; 306private async Task<DiagnosticAnalysisResult> LoadInitialAnalysisDataAsync(Project project, CancellationToken cancellationToken) 330var project = document.Project; 344private async Task<DiagnosticAnalysisResult> LoadInitialProjectAnalysisDataAsync(Project project, CancellationToken cancellationToken) 358VersionStamp serializerVersion, Project project, TextDocument? document, object key, string stateKey, ImmutableArray<DiagnosticData> diagnostics) 369var project = document.Project; 405private async ValueTask<bool> TryGetProjectDiagnosticsFromInMemoryStorageAsync(VersionStamp serializerVersion, Project project, Builder builder, CancellationToken cancellationToken) 418VersionStamp serializerVersion, Project project, TextDocument? document, object key, string stateKey, CancellationToken _) 455private readonly Project _project; 464public Builder(Project project, VersionStamp version, ImmutableHashSet<DocumentId>? documentIds = null)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (11)
45/// This will be raised whenever <see cref="StateManager"/> finds <see cref="Project.AnalyzerReferences"/> change 73/// Return <see cref="StateSet"/>s for the given <see cref="Project"/>. 78public IEnumerable<StateSet> GetStateSets(Project project) 82/// Return <see cref="StateSet"/>s for the given <see cref="Project"/>. 83/// This will either return already created <see cref="StateSet"/>s for the specific snapshot of <see cref="Project"/> or 84/// it will create new <see cref="StateSet"/>s for the <see cref="Project"/> and update internal state. 86public async Task<ImmutableArray<StateSet>> GetOrCreateStateSetsAsync(Project project, CancellationToken cancellationToken) 93/// Return <see cref="StateSet"/> for the given <see cref="DiagnosticAnalyzer"/> in the context of <see cref="Project"/>. 94/// This will either return already created <see cref="StateSet"/> for the specific snapshot of <see cref="Project"/> or 95/// it will create new <see cref="StateSet"/> for the <see cref="Project"/>. and update internal state. 97public async Task<StateSet?> GetOrCreateStateSetAsync(Project project, DiagnosticAnalyzer analyzer, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.HostStates.cs (2)
33private HostAnalyzerStateSets GetOrCreateHostStateSets(Project project, ProjectAnalyzerStateSets projectStateSets) 81private static ImmutableHashSet<object> GetReferenceIdsToRedirectAsProjectAnalyzers(Project project)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (5)
56private ProjectAnalyzerStateSets? TryGetProjectStateSets(Project project) 69private async Task<ProjectAnalyzerStateSets> GetOrCreateProjectStateSetsAsync(Project project, CancellationToken cancellationToken) 75private ProjectAnalyzerStateSets CreateProjectStateSets(Project project) 97private async Task<ProjectAnalyzerStateSets> UpdateProjectStateSetsAsync(Project project, CancellationToken cancellationToken) 125Project project,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (11)
21public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocuments, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken) 32Func<Project, DocumentId?, IReadOnlyList<DocumentId>>? getDocuments, 46private readonly Func<Project, DocumentId?, IReadOnlyList<DocumentId>> _getDocuments = getDocuments ?? (static (project, documentId) => documentId != null ? [documentId] : project.DocumentIds); 53Project project, IReadOnlyList<DocumentId> documentIds, bool includeProjectNonLocalResult, Action<DiagnosticData> callback, CancellationToken cancellationToken); 59var project = Solution.GetProject(ProjectId); 76IEnumerable<Project> projects, Func<Project, IReadOnlyList<DocumentId>> getDocumentIds, 113Project project, IReadOnlyList<DocumentId> documentIds, bool includeProjectNonLocalResult, 140var project = Solution.GetProject(ProjectId); 158private static async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(StateSet stateSet, Project project, DocumentId? documentId, AnalysisKind kind, CancellationToken cancellationToken) 172private static async Task<ImmutableArray<DiagnosticData>> GetProjectStateDiagnosticsAsync(StateSet stateSet, Project project, DocumentId? documentId, AnalysisKind kind, CancellationToken cancellationToken)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (1)
116Project project,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.ProjectAndCompilationWithAnalyzers.cs (2)
11public Project Project { get; } 14public ProjectAndCompilationWithAnalyzers(Project project, CompilationWithAnalyzersPair? compilationWithAnalyzers)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (3)
20public async Task<ImmutableArray<DiagnosticData>> ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken) 76private ImmutableArray<StateSet> GetStateSetsForFullSolutionAnalysis(ImmutableArray<StateSet> stateSets, Project project) 107private bool IsCandidateForFullSolutionAnalysis(DiagnosticAnalyzer analyzer, bool isHostAnalyzer, Project project)
Features\EditAndContinue\EditAndContinueDiagnosticSource_Workspace.cs (1)
20private sealed class ProjectSource(Project project, ImmutableArray<DiagnosticData> diagnostics) : AbstractProjectDiagnosticSource(project)
Features\Options\BlockStructureOptionsStorage.cs (1)
11public static BlockStructureOptions GetBlockStructureOptions(this IGlobalOptionService globalOptions, Project project)
Handler\Completion\CompletionHandler.cs (1)
89var project = document.Project;
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (2)
160var project = diagnosticSource.GetProject(); 258var project = solution.GetProject(textDocumentIdentifier);
Handler\Diagnostics\BuildOnlyDiagnosticIdsHandler.cs (1)
55foreach (var project in context.Solution.Projects)
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (1)
147public Project GetProject() => sources[0].GetProject();
Handler\Diagnostics\DiagnosticSourceProviders\WorkspaceDiagnosticSourceHelpers.cs (3)
15public static IEnumerable<Project> GetProjectsInPriorityOrder(Solution solution, ImmutableArray<string> supportedLanguages) 22static IEnumerable<Project?> GetProjectsInPriorityOrderWorker(Solution solution) 37foreach (var project in solution.Projects)
Handler\Diagnostics\DiagnosticSourceProviders\WorkspaceDocumentsAndProjectDiagnosticSourceProvider.cs (2)
62foreach (var project in WorkspaceDiagnosticSourceHelpers.GetProjectsInPriorityOrder(solution, context.SupportedLanguages)) 67async Task AddDocumentsAndProjectAsync(Project project, IDiagnosticAnalyzerService diagnosticAnalyzerService, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (1)
24public Project GetProject() => Document.Project;
Handler\Diagnostics\DiagnosticSources\AbstractProjectDiagnosticSource.cs (12)
14internal abstract class AbstractProjectDiagnosticSource(Project project) 17protected Project Project => project; 19public static AbstractProjectDiagnosticSource CreateForFullSolutionAnalysisDiagnostics(Project project, IDiagnosticAnalyzerService diagnosticAnalyzerService, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer) 22public static AbstractProjectDiagnosticSource CreateForCodeAnalysisDiagnostics(Project project, ICodeAnalysisDiagnosticAnalyzerService codeAnalysisService) 28public ProjectOrDocumentId GetId() => new(Project.Id); 29public Project GetProject() => Project; 31=> !string.IsNullOrEmpty(Project.FilePath) 32? new VSTextDocumentIdentifier { ProjectContext = ProtocolConversions.ProjectToProjectContext(Project), Uri = ProtocolConversions.CreateAbsoluteUri(Project.FilePath) } 34public string ToDisplayString() => Project.Name; 36private sealed class FullSolutionAnalysisDiagnosticSource(Project project, IDiagnosticAnalyzerService diagnosticAnalyzerService, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer) 53return await diagnosticAnalyzerService.GetProjectDiagnosticsForIdsAsync(Project.Solution, Project.Id,
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (1)
32private static readonly ConditionalWeakTable<Project, AsyncLazy<ILookup<DocumentId, DiagnosticData>>> s_projectToDiagnostics = new();
Handler\Diagnostics\DiagnosticSources\IDiagnosticSource.cs (2)
14/// Wrapper around a source for diagnostics (e.g. a <see cref="Project"/> or <see cref="Document"/>) 19Project GetProject();
Handler\Diagnostics\DiagnosticsPullCache.cs (3)
18internal record struct DiagnosticsRequestState(Project Project, int GlobalStateVersion, RequestContext Context, IDiagnosticSource DiagnosticSource); 22/// changed. The <see cref="VersionStamp"/> is produced by <see cref="Project.GetDependentVersionAsync(CancellationToken)"/> while the 23/// <see cref="Checksum"/> is produced by <see cref="Project.GetDependentChecksumAsync(CancellationToken)"/>. The former is faster
Handler\Diagnostics\IDiagnosticProjectInformationService.cs (3)
21VSDiagnosticProjectInformation GetDiagnosticProjectInformation(Project project); 29public VSDiagnosticProjectInformation GetDiagnosticProjectInformation(Project project) 32public static VSDiagnosticProjectInformation GetDiagnosticProjectInformationHelper(Project project)
Handler\PullHandlers\VersionedPullCache.cs (1)
74Project project,
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
40var project = contextDocument.Project;
Handler\SemanticTokens\SemanticTokensRefreshQueue.cs (1)
40public async Task TryEnqueueRefreshComputationAsync(Project project, CancellationToken cancellationToken)
Handler\SourceGenerators\SourceGeneratorRefreshQueue.cs (4)
82var oldProject = e.OldSolution.GetProject(projectId); 83var newProject = e.NewSolution.GetProject(projectId); 112async Task CheckDependentVersionsAsync(Project oldProject, Project newProject)
Handler\SpellCheck\SpellCheckPullCache.cs (1)
23var project = state.Document.Project;
Handler\SpellCheck\WorkspaceSpellCheckHandler.cs (2)
54foreach (var project in solution.Projects) 61void AddDocumentsFromProject(Project? project, ImmutableArray<string> supportedLanguages)
Handler\Tasks\WorkspaceTaskDiagnosticSourceProvider.cs (1)
37foreach (var project in WorkspaceDiagnosticSourceHelpers.GetProjectsInPriorityOrder(context.Solution, context.SupportedLanguages))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (6)
Completion\CompletionFeaturesTests.cs (2)
583Project project, LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, 876Project project, LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger,
Completion\CompletionResolveTests.cs (1)
511internal override bool ShouldTriggerCompletion(Project project, LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CodeAnalysis.Completion.CompletionOptions options, OptionSet passthroughOptions, ImmutableHashSet<string> roles = null)
Diagnostics\PullDiagnosticTests.cs (1)
1278static DiagnosticData CreateDiagnostic(string id, Document? document = null, Project? project = null)
Workspaces\LspWorkspaceManagerTests.cs (2)
446var newProjectWorkspaceTwo = testWorkspaceTwo.CurrentSolution.Projects.First().WithAssemblyName("NewCSProj1"); 502var newProject = testWorkspace.CurrentSolution.Projects.First().WithAssemblyName(newAssemblyName);
Microsoft.CodeAnalysis.Remote.ServiceHub (15)
Host\RemoteWorkspace.SolutionCreator.cs (6)
344private async Task<Solution> UpdateProjectAsync(Project project, ProjectStateChecksums oldProjectChecksums, ProjectStateChecksums newProjectChecksums, CancellationToken cancellationToken) 429private async Task<Project> UpdateDocumentsAsync<TDocumentState>( 430Project project, 476private async Task<Project> UpdateDocumentsAsync( 477Project project, 540private async Task<Project> UpdateDocumentAsync(
Host\TestUtils.cs (3)
169public static async Task<Dictionary<Checksum, object>> GetAssetMapAsync(this Project project, CancellationToken cancellationToken) 205foreach (var project in solution.Projects) 224private static async Task AppendAssetMapAsync(this Project project, Dictionary<Checksum, object> map, CancellationToken cancellationToken)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (6)
83private readonly Project _project; 92Project project, 111Project project, 609static bool ShouldRedirectAnalyzers(Project project, AnalyzerReference reference) 659public Project Project { get; } 663public CompilationWithAnalyzersCacheEntry(Checksum solutionChecksum, Project project, CompilationWithAnalyzersPair? compilationWithAnalyzers, BidirectionalMap<string, DiagnosticAnalyzer> analyzerToIdMap)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
SolutionAssetStorage.cs (1)
57public ValueTask<Scope> StoreAssetsAsync(Project project, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
GenerateType\VisualBasicGenerateTypeService.vb (1)
552Friend Overrides Function IsPublicOnlyAccessibility(expression As ExpressionSyntax, project As Project) As Boolean
GoToDefinition\VisualBasicGoToDefinitionSymbolService.vb (1)
24Protected Overrides Async Function FindRelatedExplicitlyDeclaredSymbolAsync(project As Project, symbol As ISymbol, cancellationToken As CancellationToken) As Task(Of ISymbol)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
122Private Shared Async Function AnalyzeDocumentAsync(oldProject As Project, newDocument As Document, Optional activeStatementMap As ActiveStatementsMap = Nothing) As Task(Of DocumentAnalysisResults)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
FindSymbols\VisualBasicReferenceFinder.vb (3)
24project As Project, 37project As Project, 50project As Project,
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.vb (1)
32Dim project As Project = ws.AddProject(
Microsoft.CodeAnalysis.Workspaces (458)
Classification\AbstractClassificationService.cs (1)
75var project = document.Project;
Classification\Classifier.cs (2)
59Project? project, 71Project? project,
Classification\EmbeddedLanguageClassificationServiceExtensions.cs (1)
17Project project,
Classification\IEmbeddedLanguageClassificationService.cs (1)
25Project project,
Classification\SemanticClassificationCacheUtilities.cs (1)
16var project = document.Project;
CodeFixes\CodeFix.cs (3)
21internal readonly Project Project; 43internal CodeFix(Project project, CodeAction action, Diagnostic diagnostic) 50internal CodeFix(Project project, CodeAction action, ImmutableArray<Diagnostic> diagnostics)
CodeFixes\FixAllOccurrences\DocumentBasedFixAllProvider.cs (1)
47/// other aspects of (like it's properties), or changes to the <see cref="Project"/> or <see cref="Solution"/>
CodeFixes\FixAllOccurrences\FixAllContext.cs (10)
35public Project Project => State.Project; 54/// Note that <see cref="GetDocumentDiagnosticsAsync(Document)"/>, <see cref="GetProjectDiagnosticsAsync(Project)"/> and <see cref="GetAllDiagnosticsAsync(Project)"/> methods 85Optional<(Document? document, Project project)> documentAndProject, 186Project project, 283public Task<ImmutableArray<Diagnostic>> GetProjectDiagnosticsAsync(Project project) 297public Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync(Project project) 312private async Task<ImmutableArray<Diagnostic>> GetProjectDiagnosticsAsync(Project project, bool includeAllDocumentDiagnostics) 334Optional<(Document? document, Project project)> documentAndProject = default, 350internal Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync()
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (7)
35public abstract Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken); 41public abstract Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken); 67internal static async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync( 75var project = fixAllContext.Project; 85return await ProducerConsumer<(Project project, ImmutableArray<Diagnostic> diagnostics)>.RunParallelAsync( 94var projectsAndDiagnostics = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>(); 109return ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty;
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (1)
29var project = fixAllContext.Project;
CodeFixes\FixAllOccurrences\FixAllProvider.cs (2)
55/// of it (like attributes), or changes to the <see cref="Project"/> or <see cref="Solution"/> it points at 69/// of it (like attributes), or changes to the <see cref="Project"/> or <see cref="Solution"/> it points at
CodeFixes\FixAllOccurrences\FixAllState.cs (4)
31Project project, 49protected override FixAllState With(Document? document, Project project, FixAllScope scope, string? codeActionEquivalenceKey) 87ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsToFix, 91var triggerProject = diagnosticsToFix.First().Key;
CodeFixes\FixAllOccurrences\FixAllState.FixMultipleDiagnosticProvider.cs (5)
22public ImmutableDictionary<Project, ImmutableArray<Diagnostic>> ProjectDiagnosticsMap { get; } 27ProjectDiagnosticsMap = ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty; 30public FixMultipleDiagnosticProvider(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> diagnosticsMap) 36public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 69public override Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
CodeFixes\Supression\IConfigurationFixProvider.cs (1)
34Task<ImmutableArray<CodeFix>> GetFixesAsync(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken);
CodeFixesAndRefactorings\CommonFixAllState.cs (5)
21public Project Project { get; } 29Project project, 44protected abstract TFixAllState With(Document? document, Project project, FixAllScope scope, string? codeActionEquivalenceKey); 47Optional<(Document? document, Project project)> documentAndProject = default, 72Optional<(Document? document, Project project)> documentAndProject,
CodeFixesAndRefactorings\FixAllLogger.cs (1)
166public static void LogDiagnosticsStats(int correlationId, ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectsAndDiagnosticsToFixMap)
CodeFixesAndRefactorings\IFixAllContext.cs (2)
19Project Project { get; } 29Optional<(Document? document, Project project)> documentAndProject = default,
CodeFixesAndRefactorings\IFixAllState.cs (2)
21Project Project { get; } 30Optional<(Document? document, Project project)> documentAndProject = default,
CodeRefactorings\FixAllOccurences\DocumentBasedFixAllProvider.cs (1)
49/// or changes to the <see cref="Project"/> or <see cref="Solution"/> it points at will be considered.
CodeRefactorings\FixAllOccurences\FixAllContext.cs (3)
61public Project Project => State.Project; 75Optional<(Document? document, Project project)> documentAndProject, 100Optional<(Document? document, Project project)> documentAndProject = default,
CodeRefactorings\FixAllOccurences\FixAllProvider.cs (2)
55/// of it (like attributes), or changes to the <see cref="Project"/> or <see cref="Solution"/> it points at 69/// of it (like attributes), or changes to the <see cref="Project"/> or <see cref="Solution"/> it points at
CodeRefactorings\FixAllOccurences\FixAllState.cs (3)
48Project project, 61Project project, 73protected override FixAllState With(Document? document, Project project, FixAllScope scope, string? codeActionEquivalenceKey)
Diagnostics\DiagnosticAnalysisResult.cs (3)
118public static DiagnosticAnalysisResult CreateFromBuild(Project project, ImmutableArray<DiagnosticData> diagnostics, IEnumerable<DocumentId> initialDocuments) 158Project project, 324private static void VerifyDocumentMap(Project project, ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> map)
Diagnostics\DiagnosticAnalysisResultBuilder.cs (15)
19internal struct DiagnosticAnalysisResultBuilder(Project project, VersionStamp version) 21public readonly Project Project = project; 46Contract.ThrowIfTrue(Project.SupportsCompilation); 61var diagnosticDocumentId = Project.GetDocumentForExternalLocation(diagnostic.Location); 65AddDocumentDiagnostic(ref lazyLocals, Project.GetTextDocument(diagnosticDocumentId), diagnostic); 70AddDocumentDiagnostic(ref _lazyNonLocals, Project.GetTextDocument(diagnosticDocumentId), diagnostic); 75AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project)); 82AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project)); 142var diagnosticDocumentId = Project.GetDocumentForExternalLocation(diagnostic.Location); 145AddDocumentDiagnostic(ref _lazyNonLocals, Project.GetRequiredTextDocument(diagnosticDocumentId), diagnostic); 149AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project)); 155AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project)); 163AddDocumentDiagnostic(ref lazyLocals, Project.GetDocument(diagnosticTree), diagnostic); 168AddDocumentDiagnostic(ref _lazyNonLocals, Project.GetDocument(diagnosticTree), diagnostic); 173AddOtherDiagnostic(DiagnosticData.Create(Project.Solution, diagnostic, Project));
Diagnostics\DiagnosticData.cs (4)
149public async Task<Diagnostic> ToDiagnosticAsync(Project project, CancellationToken cancellationToken) 189public static DiagnosticData Create(Solution solution, Diagnostic diagnostic, Project? project) 196var project = document.Project; 282public static bool TryCreate(DiagnosticDescriptor descriptor, string[] messageArguments, Project project, [NotNullWhen(true)] out DiagnosticData? diagnosticData)
Diagnostics\Extensions.cs (6)
24public static async Task<ImmutableArray<Diagnostic>> ToDiagnosticsAsync(this IEnumerable<DiagnosticData> diagnostics, Project project, CancellationToken cancellationToken) 35public static ValueTask<ImmutableArray<Location>> ConvertLocationsAsync(this IReadOnlyCollection<DiagnosticDataLocation> locations, Project project, CancellationToken cancellationToken) 39this DiagnosticDataLocation dataLocation, Project project, CancellationToken cancellationToken) 105Project project, 325Project project, 373Project project,
Diagnostics\HostDiagnosticAnalyzers.cs (4)
85public ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsPerReference(DiagnosticAnalyzerInfoCache infoCache, Project project) 124public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateDiagnosticAnalyzersPerReference(Project project) 136public ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>> CreateProjectDiagnosticAnalyzersPerReference(Project project) 299public SkippedHostAnalyzersInfo GetSkippedAnalyzersInfo(Project project, DiagnosticAnalyzerInfoCache infoCache)
Diagnostics\ProjectDiagnosticAnalyzer.cs (1)
20public abstract Task<ImmutableArray<Diagnostic>> AnalyzeProjectAsync(Project project, CancellationToken cancellationToken);
Editing\SymbolEditor.cs (3)
84foreach (var project in solutionChanges.GetAddedProjects()) 103var project = ChangedSolution.GetProject(symbol.ContainingAssembly, cancellationToken); 150var project = solution.GetProject(projectId);
Editing\SyntaxGenerator.cs (1)
77public static SyntaxGenerator GetGenerator(Project project)
ExternalAccess\UnitTesting\Api\UnitTestingProjectExtensions.cs (1)
15public static Task<bool> HasSuccessfullyLoadedAsync(this Project project, CancellationToken cancellationToken)
FindSymbols\Declarations\DeclarationFinder.cs (2)
19Project project, 68Project project,
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (3)
24Project project, SearchQuery query, SymbolFilter criteria, CancellationToken cancellationToken) 60Project project, SearchQuery query, SymbolFilter criteria, CancellationToken cancellationToken) 99var referencedProject = project.Solution.GetProject(projectReference.ProjectId);
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (5)
64Project project, string name, bool ignoreCase, SymbolFilter criteria, CancellationToken cancellationToken) 135Project project, string pattern, SymbolFilter criteria, CancellationToken cancellationToken) 181foreach (var project in solution.Projects) 191Project project, string name, bool ignoreCase, SymbolFilter filter, CancellationToken cancellationToken) 246Project project, string pattern, SymbolFilter criteria, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentProjectsFinder.cs (27)
36(IAssemblySymbol assembly, Project? sourceProject, SymbolVisibility visibility), 37ImmutableArray<(Project project, bool hasInternalsAccess)>>> s_solutionToDependentProjectMap = new(); 40public static async Task<ImmutableArray<Project>> GetDependentProjectsAsync( 41Solution solution, ImmutableArray<ISymbol> symbols, IImmutableSet<Project> projects, CancellationToken cancellationToken) 73private static async Task<ImmutableArray<Project>> GetDependentProjectsWorkerAsync( 80using var _ = PooledHashSet<Project>.GetInstance(out var result); 101/// cref="IAssemblySymbol"/> for both source and metadata symbols, and an optional <see cref="Project"/> if this 104private static Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility maxVisibility)> GetSymbolOriginations( 107var result = new Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility visibility)>(); 120var project = assembly.Locations.Any(static loc => loc.IsInMetadata) 134private static async Task<ImmutableArray<(Project project, bool hasInternalsAccess)>> ComputeDependentProjectsAsync( 136(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination, 143ImmutableArray<(Project project, bool hasInternalsAccess)> dependentProjects; 162static async Task<ImmutableArray<(Project project, bool hasInternalsAccess)>> ComputeDependentProjectsWorkerAsync( 164(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination, 170using var _ = PooledHashSet<(Project, bool hasInternalsAccess)>.GetInstance(out var dependentProjects); 193Solution solution, Project? sourceProject, HashSet<(Project project, bool hasInternalsAccess)> dependentProjects, CancellationToken cancellationToken) 203var project = solution.GetRequiredProject(projectId); 215var referencedProject = solution.GetProject(previous.Assembly, cancellationToken); 259(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination, 260HashSet<(Project project, bool hasInternalsAccess)> dependentProjects, 268foreach (var project in solution.Projects) 307(IAssemblySymbol assembly, Project? sourceProject) symbolOrigination, 308Project project, 324private static async Task<bool> HasReferenceToAssemblyAsync(Project project, string assemblyName, CancellationToken cancellationToken) 396static Compilation CreateCompilation(Project project)
FindSymbols\FindReferences\DependentTypeFinder.cs (14)
63IImmutableSet<Project>? projects, 131foreach (var project in orderedProjectsToExamine) 141async Task DescendInheritanceTreeInProjectAsync(Project project) 189async Task AddDescendantSourceTypesInProjectAsync(SymbolSet result, Project project) 291async Task AddDescendantMetadataTypesInProjectAsync(SymbolSet result, Project project) 333Project project, 425var sourceProject = 440ProjectDependencyGraph dependencyGraph, Project project) 447private static ImmutableArray<Project> GetOrderedProjectsToExamine( 449IImmutableSet<Project> projects, 461private static ImmutableArray<Project> OrderTopologically( 462Solution solution, IEnumerable<Project> projectsToExamine) 478private static ImmutableArray<Project> GetProjectsToExamineWorker( 480IImmutableSet<Project> projects,
FindSymbols\FindReferences\DependentTypeFinder_DerivedClasses.cs (1)
18IImmutableSet<Project>? projects,
FindSymbols\FindReferences\DependentTypeFinder_DerivedInterfaces.cs (1)
18IImmutableSet<Project>? projects,
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
17IImmutableSet<Project>? projects,
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (2)
33Project project, CancellationToken cancellationToken) 46private static async Task<ProjectIndex> CreateIndexAsync(Project project, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentTypeFinder_Remote.cs (2)
21IImmutableSet<Project>? projects, 55IImmutableSet<Project>? projects,
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (1)
30Project project,
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (15)
28ISymbol symbol, Project project, CancellationToken cancellationToken); 34ISymbol symbol, HashSet<string>? globalAliases, Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, FindReferencesSearchOptions options, CancellationToken cancellationToken); 84Project project, 117Project project, 140Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken) 147Project project, 329Project project, 345Project project, 361protected static Task FindDocumentsWithForEachStatementsAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken) 364protected static Task FindDocumentsWithUsingStatementsAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken) 803TSymbol symbol, HashSet<string>? globalAliases, Project project, IImmutableSet<Document>? documents, 813TSymbol symbol, Project project, CancellationToken cancellationToken) 819ISymbol symbol, Project project, CancellationToken cancellationToken) 827ISymbol symbol, HashSet<string>? globalAliases, Project project, 871Project project, string name, int arity, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\ConstructorInitializerSymbolReferenceFinder.cs (1)
24Project project,
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (4)
27protected override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync(IMethodSymbol symbol, Project project, CancellationToken cancellationToken) 36Project project, 71private static Task FindDocumentsWithImplicitObjectCreationExpressionAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken) 75Project project,
FindSymbols\FindReferences\Finders\DestructorSymbolReferenceFinder.cs (1)
21Project project,
FindSymbols\FindReferences\Finders\DynamicTypeSymbolReferenceFinder.cs (1)
28Project project,
FindSymbols\FindReferences\Finders\EventSymbolReferenceFinder.cs (1)
41Project project,
FindSymbols\FindReferences\Finders\ExplicitConversionSymbolReferenceFinder.cs (1)
29Project project,
FindSymbols\FindReferences\Finders\ExplicitInterfaceMethodReferenceFinder.cs (1)
21Project project,
FindSymbols\FindReferences\Finders\FieldSymbolReferenceFinder.cs (1)
32Project project,
FindSymbols\FindReferences\Finders\ILanguageServiceReferenceFinder.cs (1)
20ISymbol symbol, Project project, CancellationToken cancellationToken);
FindSymbols\FindReferences\Finders\IReferenceFinder.cs (2)
28ISymbol symbol, Project project, CancellationToken cancellationToken); 55Project project, IImmutableSet<Document>? documents,
FindSymbols\FindReferences\Finders\MethodTypeParameterSymbolReferenceFinder.cs (1)
43Project project,
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (3)
22protected override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync(INamedTypeSymbol symbol, Project project, CancellationToken cancellationToken) 55Project project, 82Project project,
FindSymbols\FindReferences\Finders\NamespaceSymbolReferenceFinder.cs (2)
21protected override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync(INamespaceSymbol symbol, Project project, CancellationToken cancellationToken) 29Project project,
FindSymbols\FindReferences\Finders\OperatorSymbolReferenceFinder.cs (2)
23Project project, 36Project project,
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (4)
50Project project, 93private static Task FindDocumentsWithDeconstructionAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken) 96private static Task FindDocumentsWithAwaitExpressionAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken) 99private static Task FindDocumentsWithCollectionInitializersAsync<TData>(Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (1)
27Project project,
FindSymbols\FindReferences\Finders\PreprocessingSymbolReferenceFinder.cs (1)
23Project project,
FindSymbols\FindReferences\Finders\PropertyAccessorSymbolReferenceFinder.cs (1)
35Project project,
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (3)
110Project project, 175Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken) 182Project project, IImmutableSet<Document>? documents, Action<Document, TData> processResult, TData processResultData, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\TypeParameterSymbolReferenceFinder.cs (1)
21Project project,
FindSymbols\FindReferences\FindReferencesSearchEngine.BidirectionalSymbolSet.cs (1)
47public override async Task InheritanceCascadeAsync(Project project, CancellationToken cancellationToken)
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (6)
126private async IAsyncEnumerable<(Project project, ImmutableArray<(ISymbol symbol, SymbolGroup group)> allSymbols)> GetProjectsAndSymbolsToSearchSeriallyAsync( 128ImmutableArray<Project> projectsToSearch, 140var currentProject = _solution.GetRequiredProject(projectId); 206private Task<ImmutableArray<Project>> GetProjectsToSearchAsync( 217Project project, ImmutableArray<(ISymbol symbol, SymbolGroup group)> allSymbols, Action<Reference> onReferenceFound, CancellationToken cancellationToken) 343Project project,
FindSymbols\FindReferences\FindReferencesSearchEngine.NonCascadingSymbolSet.cs (1)
24public override Task InheritanceCascadeAsync(Project project, CancellationToken cancellationToken)
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (3)
57public abstract Task InheritanceCascadeAsync(Project project, CancellationToken cancellationToken); 240ImmutableHashSet<Project> projects, CancellationToken cancellationToken) 275ImmutableHashSet<Project> projects,
FindSymbols\FindReferences\FindReferencesSearchEngine.UnidirectionalSymbolSet.cs (1)
45public override async Task InheritanceCascadeAsync(Project project, CancellationToken cancellationToken)
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (2)
64var currentProject = _solution.GetRequiredProject(projectId); 75async ValueTask PerformSearchInProjectSeriallyAsync(ImmutableArray<(ISymbol symbol, SymbolGroup group)> symbols, Project project)
FindSymbols\ReferenceLocationExtensions.cs (1)
28var project = projectGroup.Key;
FindSymbols\SymbolFinder_Declarations_AllDeclarations.cs (2)
17Project project, string name, bool ignoreCase, CancellationToken cancellationToken = default) 29Project project, string name, bool ignoreCase, SymbolFilter filter, CancellationToken cancellationToken = default)
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (4)
61var project = solution.GetRequiredProject(projectId); 73public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, Func<string, bool> predicate, CancellationToken cancellationToken = default) 79public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken = default) 89Project project, SearchQuery query, SymbolFilter filter, CancellationToken cancellationToken)
FindSymbols\SymbolFinder_Declarations_SourceDeclarations.cs (4)
40public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, string name, bool ignoreCase, CancellationToken cancellationToken = default) 47Project project, string name, bool ignoreCase, SymbolFilter filter, CancellationToken cancellationToken = default) 95public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsWithPatternAsync(Project project, string pattern, CancellationToken cancellationToken = default) 106Project project, string pattern, SymbolFilter filter, CancellationToken cancellationToken = default)
FindSymbols\SymbolFinder_Hierarchy.cs (19)
27ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 37ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 93ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 116IImmutableSet<Project>? projects, 204/// IImmutableSet{Project}, CancellationToken)"/>. 213INamedTypeSymbol type, Solution solution, IImmutableSet<Project>? projects, CancellationToken cancellationToken) 221/// IImmutableSet{Project}, CancellationToken)"/>. 231INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 243/// <inheritdoc cref="FindDerivedClassesArrayAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/> 246INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 267INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 279/// <inheritdoc cref="FindDerivedInterfacesAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/> 282INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 303INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 315/// <inheritdoc cref="FindImplementationsAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/> 318INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 332ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 351/// <inheritdoc cref="FindImplementationsAsync(ISymbol, Solution, IImmutableSet{Project}, CancellationToken)"/> 356ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
FindSymbols\SymbolTree\ISymbolTreeInfoCacheService.cs (3)
12/// Computes and caches <see cref="SymbolTreeInfo"/> indices for the source symbols in <see cref="Project"/>s and 17ValueTask<SymbolTreeInfo?> TryGetPotentiallyStaleSourceSymbolTreeInfoAsync(Project project, CancellationToken cancellationToken); 18ValueTask<SymbolTreeInfo?> TryGetPotentiallyStaleMetadataSymbolTreeInfoAsync(Project project, PortableExecutableReference reference, CancellationToken cancellationToken);
FindSymbols\SymbolTree\SymbolTreeInfo.cs (1)
20/// cref="Project"/> or <see cref="PortableExecutableReference"/>. This tree can be used to quickly determine if
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (5)
30private static string GetSourceKeySuffix(Project project) 34Project project, Checksum checksum, CancellationToken cancellationToken) 53Project project, CancellationToken cancellationToken) 70public static Task<Checksum> GetSourceSymbolsChecksumAsync(Project project, CancellationToken cancellationToken) 119Project project, Checksum checksum, CancellationToken cancellationToken)
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (6)
68Project project, 95Project project, CancellationToken cancellationToken) 127var project = solution.GetProject(projectId); 143private async Task AnalyzeProjectAsync(Project project, CancellationToken cancellationToken) 158private async Task UpdateSourceSymbolTreeInfoAsync(Project project, CancellationToken cancellationToken) 190Project project,
Packaging\IPackageInstallerService.cs (1)
29ImmutableArray<Project> GetProjectsWithInstalledPackage(Solution solution, string packageName, string version);
Recommendations\Recommender.cs (1)
58private static RecommendationServiceOptions GetOptions(OptionSet? options, Project project)
Remote\RemoteArguments.cs (5)
62var project = solution.GetOriginatingProject(symbol); 68public static SerializableSymbolAndProjectId Create(ISymbol symbol, Project project, CancellationToken cancellationToken) 75var project = solution.GetOriginatingProject(symbol); 86ISymbol symbol, Project project, CancellationToken cancellationToken, 103var project = solution.GetRequiredProject(projectId);
Remote\RemoteHostClient.cs (5)
31public static Task<RemoteHostClient?> TryGetClientAsync(Project project, CancellationToken cancellationToken) 140Project project, 167Project project, 209Project project, 226Project project,
Remote\RemoteServiceConnection.cs (4)
79Project project, 85Project project, 129Project project, 135Project project,
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
347var currentProject = conflictResolution.CurrentSolution.GetRequiredProject(projectId); 472private async Task<ImmutableHashSet<ISymbol>?> GetNonConflictSymbolsAsync(Project currentProject)
Rename\Renamer.RenameDocumentActionSet.cs (1)
140var project = solution.GetRequiredProject(_documentId.ProjectId);
Shared\Extensions\ISolutionExtensions.cs (1)
26var project = solution.GetProject(projectId)!;
Shared\Extensions\ProjectExtensions.cs (12)
16internal static Project WithSolutionOptions(this Project project, OptionSet options) 19public static TextDocument? GetTextDocument(this Project project, DocumentId? documentId) 22internal static DocumentId? GetDocumentForExternalLocation(this Project project, Location location) 28internal static DocumentId? GetDocumentForFile(this Project project, AdditionalText additionalText) 31private static DocumentId? GetDocumentIdWithFilePath(this Project project, string filePath) 34public static Document GetRequiredDocument(this Project project, DocumentId documentId) 37public static Document GetRequiredDocument(this Project project, SyntaxTree tree) 40public static TextDocument GetRequiredAdditionalDocument(this Project project, DocumentId documentId) 43public static TextDocument GetRequiredAnalyzerConfigDocument(this Project project, DocumentId documentId) 46public static TextDocument GetRequiredTextDocument(this Project project, DocumentId documentId) 49public static async ValueTask<Document> GetRequiredSourceGeneratedDocumentAsync(this Project project, DocumentId documentId, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\FixAllHelper.cs (1)
16Project triggerProject)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (2)
38public static Project GetRequiredProject(this Solution solution, ProjectId projectId) 40var project = solution.GetProject(projectId);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (9)
18public static TLanguageService? GetLanguageService<TLanguageService>(this Project? project) where TLanguageService : class, ILanguageService 25public static TLanguageService GetRequiredLanguageService<TLanguageService>(this Project project) where TLanguageService : class, ILanguageService 34/// Gets extended host language services, which includes language services from <see cref="Project.LanguageServices"/>. 36public static HostLanguageServices GetExtendedLanguageServices(this Project project) 45public static string? TryGetAnalyzerConfigPathForProjectConfiguration(this Project project) 48public static string? TryGetAnalyzerConfigPathForDiagnosticConfiguration(this Project project, Diagnostic diagnostic) 54private static string? TryGetAnalyzerConfigPathForProjectOrDiagnosticConfiguration(Project project, Diagnostic? diagnostic) 102public static AnalyzerConfigDocument? TryGetExistingAnalyzerConfigDocumentAtPath(this Project project, string analyzerConfigPath) 110public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (2)
58foreach (var sourceProject in solution.Projects) 76var project = solution.GetProject(symbol.ContainingAssembly, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SyntacticDocument.cs (1)
25public Project Project => Document.Project;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
12public static bool CanApplyParseOptionChange(this Project project, ParseOptions oldOptions, ParseOptions newOptions)
Storage\SQLite\v2\SQLitePersistentStorage_ProjectSerialization.cs (3)
17protected override Task<bool> ChecksumMatchesAsync(ProjectKey projectKey, Project? project, string name, Checksum checksum, CancellationToken cancellationToken) 20protected override Task<Stream?> ReadStreamAsync(ProjectKey projectKey, Project? project, string name, Checksum? checksum, CancellationToken cancellationToken) 23protected override Task<bool> WriteStreamAsync(ProjectKey projectKey, Project? project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Storage\SQLite\v2\SQLitePersistentStorageConstants.cs (1)
66/// Inside the DB we have a table for data that we want associated with a <see cref="Project"/>. The data is
Workspace\AdhocWorkspace.cs (2)
63public Project AddProject(string name, string language) 72public Project AddProject(ProjectInfo projectInfo)
Workspace\Host\ISupportedChangesService.cs (4)
21bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, Project project); 24bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project); 44public bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, Project project) 47public bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project)
Workspace\Host\PersistentStorage\AbstractPersistentStorage.cs (8)
50protected abstract Task<bool> ChecksumMatchesAsync(ProjectKey projectKey, Project? project, string name, Checksum checksum, CancellationToken cancellationToken); 52protected abstract Task<Stream?> ReadStreamAsync(ProjectKey projectKey, Project? project, string name, Checksum? checksum, CancellationToken cancellationToken); 54protected abstract Task<bool> WriteStreamAsync(ProjectKey projectKey, Project? project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken); 75public Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken) 81public Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum, CancellationToken cancellationToken) 90public Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken) 96public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 105public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken)
Workspace\Host\PersistentStorage\IChecksummedPersistentStorage.cs (3)
29Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken = default); 52Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum = null, CancellationToken cancellationToken = default); 84Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum = null, CancellationToken cancellationToken = default);
Workspace\Host\PersistentStorage\IPersistentStorage.cs (2)
19Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken = default); 32Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken = default);
Workspace\Host\PersistentStorage\NoOpPersistentStorage.cs (5)
26public Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken) 41public Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken) 50public Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum, CancellationToken cancellationToken) 65public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken) 74public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Workspace\Host\PersistentStorage\ProjectKey.cs (3)
12/// <see cref="Project"/> without needing to have the entire <see cref="Project"/> snapshot available. 34public static ProjectKey ToProjectKey(Project project)
Workspace\ProjectSystem\ProjectSystemProject.cs (4)
580var projectBeforeMutations = solutionChanges.Solution.GetRequiredProject(Id); 663Project projectBeforeMutation, 780var project = solution.GetRequiredProject(projectId); 1377var project = w.CurrentSolution.GetRequiredProject(Id);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (4)
52private readonly Action<Project> _onProjectRemoved; 82Action<Project> onProjectRemoved, 387Project project = null!; 864Func<Project, IEnumerable<TReference>> getReferences,
Workspace\Solution\AdditionalDocument.cs (1)
12internal AdditionalDocument(Project project, TextDocumentState state)
Workspace\Solution\AnalyzerConfigDocument.cs (1)
9internal AnalyzerConfigDocument(Project project, AnalyzerConfigDocumentState state)
Workspace\Solution\AssetPath.cs (1)
12/// particular, this is often used to scope to a particular <see cref="Project"/> or <see cref="Document"/> to avoid
Workspace\Solution\Document.cs (2)
46internal Document(Project project, DocumentState state) 527/// returned if the compilation for its <see cref="Project"/> was already produced. In this case, generators and
Workspace\Solution\Project.cs (35)
51/// The ID of the project. Multiple <see cref="Project"/> instances may share the same ID. However, only 90/// <see langword="true"/> if this <see cref="Project"/> supports providing data through the 465private static readonly Func<DocumentId, Project, Document?> s_tryCreateDocumentFunction = 468private static readonly Func<DocumentId, Project, AdditionalDocument?> s_tryCreateAdditionalDocumentFunction = 471private static readonly Func<DocumentId, Project, AnalyzerConfigDocument?> s_tryCreateAnalyzerConfigDocumentFunction = 474private static readonly Func<DocumentId, (SourceGeneratedDocumentState state, Project project), SourceGeneratedDocument> s_createSourceGeneratedDocumentFunction = 506public ProjectChanges GetChanges(Project oldProject) 566/// <see cref="Project.GetDependentSemanticVersionAsync(CancellationToken)"/> does not change as it only returns top level changes.</item> 568/// <see cref="Project.GetDependentSemanticVersionAsync(CancellationToken)"/> changes as the project is removed, then added resulting in a version change.</item> 578public Project WithAssemblyName(string assemblyName) 584public Project WithDefaultNamespace(string defaultNamespace) 587internal Project WithOutputFilePath(string? path) 590internal Project WithOutputRefFilePath(string? path) 593internal Project WithCompilationOutputInfo(in CompilationOutputInfo info) 599public Project WithCompilationOptions(CompilationOptions options) 605public Project WithParseOptions(ParseOptions options) 612public Project AddProjectReference(ProjectReference projectReference) 619public Project AddProjectReferences(IEnumerable<ProjectReference> projectReferences) 625public Project RemoveProjectReference(ProjectReference projectReference) 632public Project WithProjectReferences(IEnumerable<ProjectReference> projectReferences) 639public Project AddMetadataReference(MetadataReference metadataReference) 646public Project AddMetadataReferences(IEnumerable<MetadataReference> metadataReferences) 652public Project RemoveMetadataReference(MetadataReference metadataReference) 659public Project WithMetadataReferences(IEnumerable<MetadataReference> metadataReferences) 666public Project AddAnalyzerReference(AnalyzerReference analyzerReference) 673public Project AddAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferences) 679public Project RemoveAnalyzerReference(AnalyzerReference analyzerReference) 686public Project WithAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferencs) 693internal Project WithAttributes(ProjectInfo.ProjectAttributes attributes) 756public Project RemoveDocument(DocumentId documentId) 766public Project RemoveDocuments(ImmutableArray<DocumentId> documentIds) 776public Project RemoveAdditionalDocument(DocumentId documentId) 784public Project RemoveAdditionalDocuments(ImmutableArray<DocumentId> documentIds) 794public Project RemoveAnalyzerConfigDocument(DocumentId documentId) 802public Project RemoveAnalyzerConfigDocuments(ImmutableArray<DocumentId> documentIds)
Workspace\Solution\ProjectChanges.cs (14)
12internal ProjectChanges(Project newProject, Project oldProject) 20public Project OldProject { get; } 22public Project NewProject { get; } 97/// Get <see cref="DocumentId"/>s of added documents in the order they appear in <see cref="Project.DocumentIds"/> of the <see cref="NewProject"/>. 103/// Get <see cref="DocumentId"/>s of added dditional documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 109/// Get <see cref="DocumentId"/>s of added analyzer config documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 116/// in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 122/// Get changed documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 134/// in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 141/// in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="NewProject"/>. 147/// Get <see cref="DocumentId"/>s of removed documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="OldProject"/>. 153/// Get <see cref="DocumentId"/>s of removed additional documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="OldProject"/>. 159/// Get <see cref="DocumentId"/>s of removed analyzer config documents in the order they appear in <see cref="Project.DocumentIds"/> of <see cref="OldProject"/>.
Workspace\Solution\ProjectId.cs (1)
15/// An identifier that can be used to refer to the same <see cref="Project"/> across versions.
Workspace\Solution\Solution.cs (17)
32private ImmutableDictionary<ProjectId, Project> _projectIdToProjectMap; 49_projectIdToProjectMap = ImmutableDictionary<ProjectId, Project>.Empty; 125public IEnumerable<Project> Projects => ProjectIds.Select(id => GetProject(id)!); 143public Project? GetProject(ProjectId? projectId) 153private static readonly Func<ProjectId, Solution, Project> s_createProjectFunction = CreateProject; 154private static Project CreateProject(ProjectId projectId, Solution solution) 163/// Gets the <see cref="Project"/> associated with an assembly symbol. 165public Project? GetProject(IAssemblySymbol assemblySymbol, 174/// Given a <paramref name="symbol"/> returns the <see cref="ProjectId"/> of the <see cref="Project"/> it came 197internal Project? GetOriginatingProject(ISymbol symbol) 245var project = GetProject(documentId?.ProjectId); 260var project = GetProject(documentId?.ProjectId); 298var project = GetProject(documentId.ProjectId); 347public Project AddProject(string name, string assemblyName, string language) 1027/// Create a new <see cref="Solution"/> instance with the corresponding <see cref="Project"/>s updated to include 1625var newProject = newSolution.GetRequiredProject(newDocumentState.Id.ProjectId); 1651internal Solution WithCachedSourceGeneratorState(ProjectId projectToUpdate, Project projectWithCachedGeneratorState)
Workspace\Solution\SolutionChanges.cs (2)
22public IEnumerable<Project> GetAddedProjects() 49public IEnumerable<Project> GetRemovedProjects()
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (2)
134/// <see cref="Project.GetCompilationAsync"/> or <see cref="Project.TryGetCompilation"/> must be from a <see
Workspace\Solution\SolutionCompilationState.cs (4)
1073/// Gets the <see cref="Project"/> associated with an assembly symbol. 1750/// <inheritdoc cref="Solution.WithCachedSourceGeneratorState(ProjectId, Project)"/> 1751public SolutionCompilationState WithCachedSourceGeneratorState(ProjectId projectToUpdate, Project projectWithCachedGeneratorState) 1819public GeneratorDriver? GetGeneratorDriver(Project project)
Workspace\Solution\SolutionCompilationState.ICompilationTracker.cs (1)
20/// Returns <see langword="true"/> if this <see cref="Project"/>/<see cref="Compilation"/> could produce the
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (3)
41/// A helper type for mapping <see cref="ISymbol"/> back to an originating <see cref="Project"/>/<see 45/// In IDE scenarios we have the need to map from an <see cref="ISymbol"/> to the <see cref="Project"/> that 49/// cref="SymbolKey"/>) to resolve that symbol back in that that <see cref="Project"/>.
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (2)
38/// cref="VersionStamp"/> for a project. As long as the <see cref="Project.GetDependentSemanticVersionAsync"/> for 104/// The <see cref="Project.GetDependentSemanticVersionAsync"/> version of the project that the <see
Workspace\Solution\SourceGeneratedDocument.cs (1)
15internal SourceGeneratedDocument(Project project, SourceGeneratedDocumentState state)
Workspace\Solution\TextDocument.cs (2)
23public Project Project { get; } 25internal TextDocument(Project project, TextDocumentState state, TextDocumentKind kind)
Workspace\Workspace.cs (14)
301foreach (var addedProject in changes.GetAddedProjects()) 1451foreach (var p in solution.Projects) 1467var project = solution.GetProject(pid)!; 1566foreach (var proj in solutionChanges.GetAddedProjects()) 1588foreach (var proj in solutionChanges.GetRemovedProjects()) 1830/// Called during a call to <see cref="TryApplyChanges(Solution)"/> to determine if a specific change to <see cref="Project.CompilationOptions"/> is allowed. 1839public virtual bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, Project project) 1843/// Called during a call to <see cref="TryApplyChanges(Solution)"/> to determine if a specific change to <see cref="Project.ParseOptions"/> is allowed. 1852public virtual bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project) 2028private static ProjectInfo CreateProjectInfo(Project project) 2088var oldProject = CurrentSolution.GetRequiredProject(projectId); 2089var newProjectForAssert = oldProject.WithCompilationOptions(options); 2106var oldProject = CurrentSolution.GetRequiredProject(projectId); 2107var newProjectForAssert = oldProject.WithParseOptions(options);
Workspace\Workspace_Editor.cs (3)
879protected virtual Project AdjustReloadedProject(Project oldProject, Project reloadedProject)
Workspace\Workspace_SourceGeneration.cs (1)
121var requestedProject = solution.GetProject(projectId);
Workspace\WorkspaceChangeEventArgs.cs (1)
39/// The id of the affected <see cref="Project"/>. Can be <see langword="null"/> if this is an change unrelated
Microsoft.CodeAnalysis.Workspaces.MSBuild (11)
MSBuild\MSBuildWorkspace.cs (7)
222public Task<Project> OpenProjectAsync( 238public async Task<Project> OpenProjectAsync( 261var projectResult = this.CurrentSolution.GetProject(projects[0].Id); 333var project = projectChanges.OldProject ?? projectChanges.NewProject; 627var project = this.CurrentSolution.GetProject(projectId); 652var project = this.CurrentSolution.GetProject(projectReference.ProjectId); 667var project = this.CurrentSolution.GetProject(projectReference.ProjectId);
MSBuild\ProjectMap.cs (4)
64foreach (var project in solution.Projects) 73/// Add a <see cref="Project"/> to this <see cref="ProjectMap"/>. 75/// <param name="project">The <see cref="Project"/> to add to this <see cref="ProjectMap"/>.</param> 76public void Add(Project project)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (148)
MSBuildWorkspaceTestBase.cs (6)
61var project = sol.Projects.First(); 70var project = sol.Projects.First(); 79var project = sol.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 88var project = sol.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 117var p1 = sol.Projects.First(p => p.Language == LanguageNames.CSharp); 118var p2 = sol.Projects.First(p => p.Language == LanguageNames.VisualBasic);
NetCoreTests.cs (18)
80var project = await workspace.OpenProjectAsync(projectFilePath); 109var libraryProject = await workspace.OpenProjectAsync(libraryFilePath); 120var project = await workspace.OpenProjectAsync(projectFilePath); 149var project = await workspace.OpenProjectAsync(projectFilePath); 160var library2 = await workspace.OpenProjectAsync(library2FilePath); 171static void AssertSingleProjectReference(Project project, string projectRefFilePath) 200foreach (var project in workspace.CurrentSolution.Projects) 213foreach (var project in workspace.CurrentSolution.Projects) 241foreach (var project in workspace.CurrentSolution.Projects) 290foreach (var project in workspace.CurrentSolution.Projects) 312foreach (var project in workspace.CurrentSolution.Projects) 349foreach (var project in projects) 353var referencedProject = workspace.CurrentSolution.GetProject(projectReference.ProjectId); 388foreach (var project in projects) 418var project = await workspace.OpenProjectAsync(projectFilePath); 476var project = await workspace.OpenProjectAsync(fullProjectPath); 497var project = await workspace.OpenProjectAsync(vbProjectFilePath); 515static void AssertSingleProjectReference(Project project, string projectRefFilePath)
NewlyCreatedProjectsFromDotNetNew.cs (1)
222var project = await workspace.OpenProjectAsync(projectFilePath, cancellationToken: CancellationToken.None);
VisualStudioMSBuildWorkspaceTests.cs (123)
59var project = solution.Projects.First(); 75var vbProject = solution.Projects.First(p => p.Language == LanguageNames.VisualBasic); 114var p0 = solution.Projects.ElementAt(0); 115var p1 = solution.Projects.ElementAt(1); 146var proj1 = await workspace.OpenProjectAsync(fullPath1); 147var proj2 = await workspace.OpenProjectAsync(fullPath2); 182private static MetadataReference GetMetadataReference(Project project, string name) 187private static MetadataReference GetMetadataReferenceByAlias(Project project, string aliasName) 243var p1 = sol.Projects.First(p => p.Language == LanguageNames.CSharp); 244var p2 = sol.Projects.First(p => p.Language == LanguageNames.VisualBasic); 258var p1 = sol.Projects.First(p => p.Language == LanguageNames.CSharp); 259var p2 = sol.Projects.First(p => p.Language == LanguageNames.VisualBasic); 279var project = solution.Projects.Single(); 297var project = sol.Projects.First(p => p.Language == language); 312var p1 = sol.Projects.First(p => p.Language == LanguageNames.CSharp); 313var p2 = sol.Projects.First(p => p.Language == LanguageNames.VisualBasic); 335var p1 = sol.Projects.First(p => p.Language == LanguageNames.CSharp); 345var p2 = p1.Solution.Projects.First(p => p.Language == LanguageNames.VisualBasic); 372var project2 = solution.GetProjectsByName("Project2").First(); 391var project = solution.Projects.First(); 435var project = await workspace.OpenProjectAsync(projectFilePath); 456var project = await workspace.OpenProjectAsync(projectFilePath); 474var project = await workspace.OpenProjectAsync(projectFilePath); 490var project = await workspace.OpenProjectAsync(projectFilePath); 505var project = await workspace.OpenProjectAsync(projectFilePath); 519var project = await workspace.OpenProjectAsync(projectFilePath); 534var project = await workspace.OpenProjectAsync(projectFilePath); 549var project = await workspace.OpenProjectAsync(projectFilePath); 562var project = await workspace.OpenProjectAsync(projectFilePath); 574var project = await workspace.OpenProjectAsync(projectFilePath); 588var project = solution.Projects.First(); 601var project = await workspace.OpenProjectAsync(projectFilePath); 614var project = await workspace.OpenProjectAsync(projectFilePath); 629var project = await workspace.OpenProjectAsync(projectFilePath); 643var project = await workspace.OpenProjectAsync(projectFilePath); 658var project = await workspace.OpenProjectAsync(projectFilePath); 673var project = await workspace.OpenProjectAsync(projectFilePath); 687var project = await workspace.OpenProjectAsync(projectFilePath); 700var project = await workspace.OpenProjectAsync(projectFilePath); 713var project = await workspace.OpenProjectAsync(projectFilePath); 727var project = await workspace.OpenProjectAsync(projectFilePath); 742var project = await workspace.OpenProjectAsync(projectFilePath); 760var project = await workspace.OpenProjectAsync(projectFilePath); 788var project = solution.Projects.First(); 806var project = solution.Projects.First(); 824var project = solution.Projects.First(); 842var project = solution.Projects.First(); 893var project = await workspace.OpenProjectAsync(projectFilePath); 912var project = await workspace.OpenProjectAsync(projectFilePath); 1222var project = await workspace.OpenProjectAsync(projectFilePath); 1251var project = await workspace.OpenProjectAsync(projectFilePath); 1284var project = await workspace.OpenProjectAsync(projectFilePath); 1322var project = await workspace.OpenProjectAsync(projectFilePath); 1346var project = await workspace.OpenProjectAsync(projectFilePath); 1369var project = await workspace.OpenProjectAsync(projectFilePath); 1391var project = await workspace.OpenProjectAsync(projectFilePath); 1412var project = await workspace.OpenProjectAsync(projectFilePath); 1435var vbProject = await workspace.OpenProjectAsync(vbProjectFilePath); 1442var csProject = await workspace.OpenProjectAsync(csProjectFilePath); 1467var project = await workspace.OpenProjectAsync(projectFilePath); 1655var project = sol.Projects.First(); 1836var project = solution.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 1862var project = solution.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 1896var project = sol.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 1919var project = sol.GetProjectsByName("VisualBasicProject").FirstOrDefault(); 1943var project = sol.GetProjectsByName("CSharpProject").FirstOrDefault(); 1966var project = sol.GetProjectsByName("CSharpProject").FirstOrDefault(); 1991var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2012var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2019var project2 = solution2.GetProjectsByName("CSharpProject").FirstOrDefault(); 2038var projectB = workspaceB.CurrentSolution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2053var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2062var project2 = solution2.GetProjectsByName("CSharpProject").FirstOrDefault(); 2087var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2095var project2 = solution2.GetProjectsByName("CSharpProject").FirstOrDefault(); 2168var project = solution.GetProjectsByName("CSharpProject").FirstOrDefault(); 2195var csProject = await workspace.OpenProjectAsync(csProjectFilePath); 2199var vbProject = await workspace.OpenProjectAsync(vbProjectFilePath); 2301var proj = await workspace.OpenProjectAsync(projectFullPath); 2326var proj = await workspace.OpenProjectAsync(projectFullPath); 2350var proj = await workspace.OpenProjectAsync(projectFullPath); 2368var project = await workspace.OpenProjectAsync(projectFullPath); 2388var proj = await workspace.OpenProjectAsync(projectFullPath); 2411var proj = await workspace.OpenProjectAsync(fullPath); 2428var proj = sol.Projects.First(); 2447foreach (var project in sol.Projects) 2467var project = await workspace.OpenProjectAsync(referencingProjectPath); 2520foreach (var project in sol.Projects) 2535var project = solution.Projects.First(); 2551var project = solution.Projects.First(); 2569var project = solution.Projects.First(p => p.Language == LanguageNames.VisualBasic); 2587var csproject = workspace.CurrentSolution.Projects.First(p => p.Language == LanguageNames.CSharp); 2595var vbproject = workspace.CurrentSolution.Projects.First(p => p.Language == LanguageNames.VisualBasic); 2664var project = solution.Projects.First(); 2728var testProject = solution.Projects.FirstOrDefault(p => p.Name == "ReferenceTest"); 2732var libraryProject = solution.Projects.FirstOrDefault(p => p.Name == "Library1"); 2754var testProject = solution.Projects.FirstOrDefault(p => p.Name == "ReferenceTest"); 2758var library1Project = solution.Projects.FirstOrDefault(p => p.Name == "Library1"); 2762var library2Project = solution.Projects.FirstOrDefault(p => p.Name == "Library2"); 2792var project = await workspace.OpenProjectAsync(projPath); 2811var project = await workspace.OpenProjectAsync(projPath); 2830var project = await workspace.OpenProjectAsync(projPath); 2878var project = await workspace.OpenProjectAsync(projPath); 2934var project = solution.Projects.First(); 2962var project = solution.Projects.First(p => p.Language == LanguageNames.VisualBasic); 2990var proj = await workspace.OpenProjectAsync(projectFilePath); 3004var proj = await workspace.OpenProjectAsync(projectFilePath); 3021var proj = await workspace.OpenProjectAsync(projectFilePath); 3043var project = Assert.Single(solution.Projects); 3056var proj = await workspace.OpenProjectAsync(projectFilePath); 3071var project = await workspace.OpenProjectAsync(projectFilePath); 3088var project = await workspace.OpenProjectAsync(projectFilePath); 3105var proj = await workspace.OpenProjectAsync(projectFilePath); 3172foreach (var project in solution.Projects) 3191var project = await workspace.OpenProjectAsync(projectFilePath); 3212var project = solution.Projects.Single(p => p.FilePath.EndsWith("CSharpProject_ProjectReference.csproj")); 3239var project = await workspace.OpenProjectAsync(projectFullPath); 3262var project = await workspace.OpenProjectAsync(projectFullPath); 3275var csharpProject = solution.Projects.Single(); 3306var project = await workspace.OpenProjectAsync(projPath); 3325var project = await workspace.OpenProjectAsync(GetSolutionFileName("Project.csproj")); 3338var project = await workspace.OpenProjectAsync(GetSolutionFileName(@"CSharpProject\CSharpProject.csproj")); 3351var project = await workspace.OpenProjectAsync(GetSolutionFileName(@"CSharpProject\CSharpProject.csproj"));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Formatting\FormattingTestBase.cs (1)
43var project = workspace.CurrentSolution.AddProject("Project", "Project.dll", language);
SolutionUtilities.cs (2)
99public static Tuple<Project, ProjectReference> GetSingleAddedProjectReference(Solution oldSolution, Solution newSolution) 105public static Project AddEmptyProject(Solution solution, string languageName = LanguageNames.CSharp, string name = "TestProject")
WorkspaceExtensions.cs (1)
54public static IEnumerable<Project> GetProjectsByName(this Solution solution, string name)
Workspaces\TestWorkspace`1.cs (1)
592public override bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project)
Microsoft.CodeAnalysis.Workspaces.UnitTests (211)
CodeCleanup\AddMissingTokensTests.cs (1)
2730var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CodeCleanup\CodeCleanupTests.cs (1)
418var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CodeCleanup\FixIncorrectTokenTests.cs (1)
755var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CodeCleanup\NormalizeModifiersOrOperatorsTests.cs (1)
1031var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CodeCleanup\ReduceTokenTests.cs (1)
2018var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CommandLineProject\CommandLineProjectWorkspaceTests.cs (2)
30var project = ws.CurrentSolution.GetProject(info.Id); 58var project = ws.CurrentSolution.GetProject(info.Id);
FindAllDeclarationsTests.cs (20)
94using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 113using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 123var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project, testHost); 260using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 270var declarations = await SymbolFinder.FindSourceDeclarationsAsync((Project)null, "Test", true); 279using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 289using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 416using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 424using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 432using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 442var declarations = await SymbolFinder.FindSourceDeclarationsAsync((Project)null, str => str.Contains("Test")); 451using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 461using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 550using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 563using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 573var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync((Project)null, "test"); 582using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 592using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 667var project = solution.Projects.First(); 704var project = solution.Projects.Single();
FindAllDeclarationsTests.TestSolutionsAndProject.cs (1)
140private Workspace CreateWorkspaceWithProject(SolutionKind solutionKind, out Project project, TestHost testHost = TestHost.OutOfProcess)
FindReferencesTests.cs (13)
103var project = solution.Projects.First(); 128var project = solution.Projects.First(); 177var prj = sln.GetProject(prj1Id).WithCompilationOptions(new VisualBasic.VisualBasicCompilationOptions(OutputKind.ConsoleApplication, embedVbCoreRuntime: true)); 216var prj = sln.GetProject(prj1Id).WithCompilationOptions(new VisualBasic.VisualBasicCompilationOptions(OutputKind.ConsoleApplication, embedVbCoreRuntime: true)); 280var prj = sln.GetProject(prj1Id).WithCompilationOptions(new CSharp.CSharpCompilationOptions(OutputKind.ConsoleApplication)); 323var project = solution.Projects.First(); 388var netCoreProject = solution.Projects.First(p => p.Name == "NetCoreProject"); 389var netStandardProject = solution.Projects.First(p => p.Name == "NetStandardProject"); 435var project = solution.Projects.Single(); 513var project = solution.Projects.First(); 540var project = solution.Projects.First(); 573var project = solution.Projects.First(); 615var project = solution.Projects.First();
Formatter\FormatterTests.cs (4)
51var project = workspace.AddProject("Dummy", NoCompilationConstants.LanguageName); 69var project = workspace.AddProject("Dummy", NoCompilationConstants.LanguageName); 113var csProject = workspace.AddProject("CS", LanguageNames.CSharp); 114var vbProject = workspace.AddProject("VB", LanguageNames.VisualBasic);
GeneratedCodeRecognitionTests.cs (5)
57var project = CreateProject(); 59var projectWithUserConfiguredGeneratedCodeTrue = project.AddAnalyzerConfigDocument(".editorconfig", 65var projectWithUserConfiguredGeneratedCodeFalse = project.AddAnalyzerConfigDocument(".editorconfig", 83static void TestCore(string fileName, Project project, bool assertGenerated) 97private static Project CreateProject()
SemanticModelReuse\SemanticModelReuseTests.cs (1)
27var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
Simplifier\SimplifierTests.cs (3)
28var project = workspace.AddProject("CSharpTest", LanguageNames.CSharp); 76var csProject = workspace.AddProject("CS", LanguageNames.CSharp); 77var vbProject = workspace.AddProject("VB", LanguageNames.VisualBasic);
SolutionTests\ProjectDependencyGraphTests.cs (11)
503var a = solution.GetProjectsByName("A").Single(); 504var b = solution.GetProjectsByName("B").Single(); 505var d = solution.GetProjectsByName("D").Single(); 531var a = solution.GetProjectsByName("A").Single(); 532var b = solution.GetProjectsByName("B").Single(); 533var e = solution.GetProjectsByName("E").Single(); 560var a = solution.GetProjectsByName("A").Single(); 561var b = solution.GetProjectsByName("B").Single(); 562var c = solution.GetProjectsByName("C").Single(); 613var b = solution.GetProjectsByName("B").Single(); 614var c = solution.GetProjectsByName("C").Single();
SolutionTests\ProjectSemanticVersionTests.cs (6)
22var project = AddEmptyProject(workspace.CurrentSolution); 31var project = AddEmptyProject(workspace.CurrentSolution) 261private static async Task AssertSemanticVersionChangedAsync(Project project1, Project project2) 266private static async Task AssertSemanticVersionUnchangedAsync(Project project1, Project project2)
SolutionTests\SolutionTests.cs (72)
336var project = solution.GetProject(projectId)!; 2317var project2 = solution.Projects.Single(); 2534var project = solution.GetProject(pid); 2546var project = solution.GetProject(project1); 2575var project = solution.GetProject(pid); 2595var project2 = solution.GetProject(pid2); 2619var project = Assert.Single(solution.Projects); 2644var project1 = solution.GetProject(projectId1); 2645var project2 = solution.GetProject(projectId2); 2697var finalProject = solution.Projects.Single(); 2836foreach (var project in solution.Projects) 3063var project = sol.GetProject(pid); 3480var proj = sol.GetProject(pid); 3971var project3 = solution.GetProject(pid3); 3974var projectForBaseType = solution.GetProject(classC.BaseType.ContainingAssembly); 3990var proj = ws.AddProject("proj", LanguageNames.CSharp); 4007var project = workspace.AddProject("CSharpProject", LanguageNames.CSharp); 4016var project1 = workspace.AddProject( 4024var project2 = workspace.AddProject( 4044var project1 = workspace.AddProject( 4054var project2 = workspace.AddProject( 4073var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4098var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4126var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4171var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 4217var project1 = workspace.AddProject( 4226var project2 = workspace.AddProject( 4249var project = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4267var project = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4283var originalProject = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4288var forkedProject = originalProject.RemoveDocument(originalProject.DocumentIds.Single()) 4307var originalProject = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp) 4312var forkedProject = originalProject.RemoveDocument(originalProject.DocumentIds.Single()) 4467GetMultipleProjects(out var csBrokenProject, out var vbNormalProject, out var dependsOnBrokenProject, out var dependsOnVbNormalProject, out var transitivelyDependsOnBrokenProjects, out var transitivelyDependsOnNormalProjects); 4548var dummyProject = solution.AddProject("dummy", "dummy", LanguageNames.CSharp); 4691var project = solution.GetProject(projectId); 4725var project = solution.GetProject(projectId); 4766var project = solution.GetProject(projectId); 5313out Project csBrokenProject, 5314out Project vbNormalProject, 5315out Project dependsOnBrokenProject, 5316out Project dependsOnVbNormalProject, 5317out Project transitivelyDependsOnBrokenProjects, 5318out Project transitivelyDependsOnNormalProjects) 5577var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 5583var frozenProject = frozenSolution.Projects.Single(); 5594var project = workspace.CurrentSolution.AddProject("CSharpProject", "CSharpProject", LanguageNames.CSharp); 5602var frozenProject = frozenSolution.Projects.Single(); 5614var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5615var project2 = project1.Solution.AddProject("CSharpProject2", "CSharpProject2", LanguageNames.CSharp); 5624var frozenProject1 = frozenSolution.GetProject(project1.Id); 5627var frozenProject2 = frozenSolution.GetProject(project2.Id); 5642var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5643var project2 = project1.Solution.AddProject("CSharpProject2", "CSharpProject2", LanguageNames.CSharp); 5654var frozenProject1 = frozenSolution.GetProject(project1.Id); 5661var frozenProject2 = frozenSolution.GetProject(project2.Id); 5672var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5673var project2 = project1.Solution.AddProject("CSharpProject2", "CSharpProject2", LanguageNames.CSharp); 5684var frozenProject1 = frozenSolution.GetProject(project1.Id); 5691var frozenProject2 = frozenSolution.GetProject(project2.Id); 5705var project1 = workspace.CurrentSolution.AddProject("CSharpProject1", "CSharpProject1", LanguageNames.CSharp); 5715var forkedProject1 = frozenSolution.WithDocumentText(project1.Documents.Single().Id, SourceText.From("class Doc2 { }")).GetProject(project1.Id); 5730var project1 = workspace.CurrentSolution 5782var project = workspace.CurrentSolution.AddProject("TypeScript", "TypeScript", "TypeScript"); 5787var frozenProject = frozenSolution.Projects.Single(); 5803var project1 = workspace.CurrentSolution 5813var project2 = project1.Solution
SolutionTests\SolutionWithSourceGeneratorTests.cs (36)
49var project = AddEmptyProject(workspace.CurrentSolution) 90var project = AddEmptyProject(workspace.CurrentSolution) 138var project = AddEmptyProject(workspace.CurrentSolution) 182var project = AddEmptyProject(workspace.CurrentSolution) 254var project = AddEmptyProject(workspace.CurrentSolution) 267static async Task AssertCompilationContainsOneRegularAndOneGeneratedFile(Project project, DocumentId documentId, string expectedGeneratedContents) 294var project = AddEmptyProject(workspace.CurrentSolution) 320static async Task AssertCompilationContainsGeneratedFilesAsync(Project project, params string[] expectedGeneratedContents) 338var project = AddEmptyProject(workspace.CurrentSolution) 347var partialProject = project.Documents.Single().WithFrozenPartialSemantics(forceFreeze, CancellationToken.None).Project; 366var projectBeforeChange = AddEmptyProject(workspace.CurrentSolution) 372var projectAfterChange = 405var project = AddEmptyProject(solution); 444var project = AddEmptyProject(workspace.CurrentSolution) 458var project = AddEmptyProject(workspace.CurrentSolution) 481var project = AddEmptyProject(workspace.CurrentSolution) 501var project = AddEmptyProject(workspace.CurrentSolution) 528var project = AddEmptyProject(workspace.CurrentSolution) 563static async Task<Project> MakeChangesToDocument(Project project) 576var project = AddEmptyProject(workspace.CurrentSolution); 589var project = AddEmptyProject(workspace.CurrentSolution) 613var project = AddEmptyProject(workspace.CurrentSolution) 691var project = AddEmptyProject(workspace.CurrentSolution) 719var project = AddEmptyProject(workspace.CurrentSolution) 750var project = AddEmptyProject(workspace.CurrentSolution) 779var project = AddEmptyProject(workspace.CurrentSolution) 847var project = AddEmptyProject(workspace.CurrentSolution); 871var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 885static async Task AssertFrozen(Project project, SourceGeneratedDocumentIdentity identity) 906var project2 = AddEmptyProject(solution, name: "TestProject2").AddAnalyzerReference(analyzerReference); 929var project = AddEmptyProject(workspace.CurrentSolution).AddAnalyzerReference(analyzerReference); 949var project0 = AddEmptyProject(workspace.CurrentSolution); 952var project1 = project0.AddAnalyzerReference(analyzerReference1); 958var project2 = project1.RemoveAnalyzerReference(analyzerReference1); 968var project3 = project2.AddAnalyzerReference(analyzerReference2);
SolutionTests\SourceGeneratorTelemetryCollectorWorkspaceServiceTests.cs (1)
31var project = AddEmptyProject(workspace.CurrentSolution)
SolutionTests\TryApplyChangesTests.cs (9)
47public override bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, Project project) 57public override bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, Project project) 77var project = workspace.CurrentSolution.Projects.Single(); 90var project = workspace.CurrentSolution.Projects.Single(); 103var project = workspace.CurrentSolution.Projects.Single(); 120var project = workspace.CurrentSolution.Projects.Single(); 135var project = workspace.CurrentSolution.Projects.Single(); 150var project = workspace.CurrentSolution.Projects.Single(); 164var project = workspace.CurrentSolution.Projects.Single();
SymbolKeyTests.cs (2)
864var project = workspace.AddProject("Test", LanguageNames.CSharp); 911var project = workspace.AddProject("Test", LanguageNames.CSharp);
WorkspaceTests\AdhocWorkspaceTests.cs (9)
36var project = ws.AddProject(info); 48var project = ws.AddProject("TestProject", LanguageNames.CSharp); 58var project = ws.AddProject("TestProject", LanguageNames.CSharp); 70var project = ws.AddProject("TestProject", LanguageNames.CSharp); 98var project = solution.Projects.FirstOrDefault(); 131var project1 = solution.GetProject(id1); 137var project2 = solution.GetProject(id2); 173var proj = ws.CurrentSolution.Projects.First(); 382var proj = pws.CurrentSolution.GetProject(projid);
WorkspaceTests\WorkspaceReferenceTests.cs (9)
29var project = ws.AddProject(projectInfo); 58var referenceProject = ws.AddProject(referenceInfo); 69var project = ws.AddProject(projectInfo); 98var referenceProject = ws.AddProject(referenceInfo); 109var project = ws.AddProject(projectInfo); 138var referenceProject = ws.AddProject(referenceInfo); 149var project = ws.AddProject(projectInfo); 182var project = ws.AddProject(projectInfo); 189var forkedProject = project.WithMetadataReferences(ImmutableArray.Create<MetadataReference>(
WorkspaceTests\WorkspaceTests.cs (2)
127public Project AddProject(string name, string language) 133public Project AddProject(ProjectInfo projectInfo)
Microsoft.Gen.ComplianceReports.Unit.Tests (14)
test\Generators\Shared\RoslynTestUtils.cs (14)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true) 52public static Project CreateTestProject( 88public static void CommitChanges(this Project proj) 93public static Project WithDocument(this Project proj, string name, string text) 98public static Document FindDocument(this Project proj, string name) 267var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences); 310var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences, langVersion); 361var proj = CreateTestProject(references, includeBaseReferences); 397var proj = CreateTestProject(references); 443var proj = CreateTestProject(references); 498var changedProj = solution.GetProject(proj.Id); 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project)
Microsoft.Gen.ContextualOptions.Unit.Tests (14)
test\Generators\Shared\RoslynTestUtils.cs (14)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true) 52public static Project CreateTestProject( 88public static void CommitChanges(this Project proj) 93public static Project WithDocument(this Project proj, string name, string text) 98public static Document FindDocument(this Project proj, string name) 267var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences); 310var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences, langVersion); 361var proj = CreateTestProject(references, includeBaseReferences); 397var proj = CreateTestProject(references); 443var proj = CreateTestProject(references); 498var changedProj = solution.GetProject(proj.Id); 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project)
Microsoft.Gen.Logging.Unit.Tests (14)
test\Generators\Shared\RoslynTestUtils.cs (14)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true) 52public static Project CreateTestProject( 88public static void CommitChanges(this Project proj) 93public static Project WithDocument(this Project proj, string name, string text) 98public static Document FindDocument(this Project proj, string name) 267var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences); 310var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences, langVersion); 361var proj = CreateTestProject(references, includeBaseReferences); 397var proj = CreateTestProject(references); 443var proj = CreateTestProject(references); 498var changedProj = solution.GetProject(proj.Id); 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project)
Microsoft.Gen.Metrics.Unit.Tests (14)
test\Generators\Shared\RoslynTestUtils.cs (14)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true) 52public static Project CreateTestProject( 88public static void CommitChanges(this Project proj) 93public static Project WithDocument(this Project proj, string name, string text) 98public static Document FindDocument(this Project proj, string name) 267var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences); 310var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences, langVersion); 361var proj = CreateTestProject(references, includeBaseReferences); 397var proj = CreateTestProject(references); 443var proj = CreateTestProject(references); 498var changedProj = solution.GetProject(proj.Id); 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project)
Microsoft.Gen.MetricsReports.Unit.Tests (14)
test\Generators\Shared\RoslynTestUtils.cs (14)
41public static Project CreateTestProject(IEnumerable<Assembly>? references, bool includeBaseReferences = true) 52public static Project CreateTestProject( 88public static void CommitChanges(this Project proj) 93public static Project WithDocument(this Project proj, string name, string text) 98public static Document FindDocument(this Project proj, string name) 267var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences); 310var proj = CreateTestProject(references, preprocessorSymbols, includeBaseReferences, langVersion); 361var proj = CreateTestProject(references, includeBaseReferences); 397var proj = CreateTestProject(references); 443var proj = CreateTestProject(references); 498var changedProj = solution.GetProject(proj.Id); 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project)
Microsoft.Interop.ComInterfaceGenerator (9)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (3)
183HashSet<Project> projectsToAddUnsafe = new(); 216foreach (var project in projectsToAddUnsafe) 227private static Solution AddUnsafe(Solution solution, Project project)
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (6)
39IEnumerable<Project?> sortedProjects = dependencyGraph.GetTopologicallySortedProjects(context.CancellationToken) 48public static async Task<ImmutableArray<Project>> GetProjectsWithDiagnosticsAsync(this FixAllContext context) 58ImmutableArray<Project>.Builder projectsWithDiagnostics = ImmutableArray.CreateBuilder<Project>(); 59foreach (var project in context.Solution.Projects) 69return ImmutableArray<Project>.Empty;
Microsoft.Interop.LibraryImportGenerator (10)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
52private static async Task<Solution> AddDisableRuntimeMarshallingAttributeApplicationToProject(Project project, CancellationToken cancellationToken)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (3)
183HashSet<Project> projectsToAddUnsafe = new(); 216foreach (var project in projectsToAddUnsafe) 227private static Solution AddUnsafe(Solution solution, Project project)
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (6)
39IEnumerable<Project?> sortedProjects = dependencyGraph.GetTopologicallySortedProjects(context.CancellationToken) 48public static async Task<ImmutableArray<Project>> GetProjectsWithDiagnosticsAsync(this FixAllContext context) 58ImmutableArray<Project>.Builder projectsWithDiagnostics = ImmutableArray.CreateBuilder<Project>(); 59foreach (var project in context.Solution.Projects) 69return ImmutableArray<Project>.Empty;
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\BestFriendTest.cs (1)
66var projectA = solution.AddProject("ProjectA", "ProjectA", LanguageNames.CSharp);
Microsoft.VisualStudio.LanguageServices (177)
CallHierarchy\CallHierarchyItem.cs (1)
38Project project)
CallHierarchy\CallHierarchyProvider.cs (2)
56ISymbol symbol, Project project, ImmutableArray<Location> callsites, CancellationToken cancellationToken) 103public async Task<IEnumerable<AbstractCallFinder>> CreateFindersAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
CallHierarchy\Finders\AbstractCallFinder.cs (6)
94var project = workspace.CurrentSolution.GetProject(_projectId); 116private static IImmutableSet<Document> IncludeDocuments(CallHierarchySearchScope scope, Project project) 126var currentProject = project.Solution.GetProject(activeDocument.ProjectId); 148protected virtual async Task SearchWorkerAsync(ISymbol symbol, Project project, ICallHierarchySearchCallback callback, IImmutableSet<Document> documents, CancellationToken cancellationToken) 165var callingProject = project.Solution.GetProject(caller.CallingSymbol.ContainingAssembly, cancellationToken); 180protected abstract Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken);
CallHierarchy\Finders\BaseMemberFinder.cs (1)
29protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\CallToOverrideFinder.cs (1)
25protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\FieldReferenceFinder.cs (1)
32protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\ImplementerFinder.cs (2)
35protected override Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken) 38protected override async Task SearchWorkerAsync(ISymbol symbol, Project project, ICallHierarchySearchCallback callback, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\InterfaceImplementationCallFinder.cs (1)
32protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\MethodCallFinder.cs (1)
35protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\OverridingMemberFinder.cs (2)
31protected override Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken) 34protected override async Task SearchWorkerAsync(ISymbol symbol, Project project, ICallHierarchySearchCallback callback, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
195ImmutableArray<Project> projects,
CodeLens\CodeLensCallbackListener.cs (1)
65foreach (var project in solution.Projects)
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (10)
108var project = projectsWithHierarchy.FirstOrDefault(); 123foreach (var project in projectsWithHierarchy) 308var project = GetProject(hierarchy); 313ImmutableArray<Project> otherProjectsForMultiTfmProject; 323otherProjectsForMultiTfmProject = ImmutableArray<Project>.Empty; 340var onAfterProjectAnalyzed = statusBarUpdater != null ? statusBarUpdater.OnAfterProjectAnalyzed : (Action<Project>)((Project _) => { }); 343foreach (var otherProject in otherProjectsForMultiTfmProject) 348private Project? GetProject(IVsHierarchy? hierarchy) 403internal void OnAfterProjectAnalyzed(Project _)
EditorConfigSettings\DataProvider\CodeStyle\CommonCodeStyleSettingsProvider.cs (1)
24protected override void UpdateOptions(TieredAnalyzerConfigOptions options, ImmutableArray<Project> projectsInScope)
EditorConfigSettings\DataProvider\Whitespace\CommonWhitespaceSettingsProvider.cs (1)
24protected override void UpdateOptions(TieredAnalyzerConfigOptions options, ImmutableArray<Project> projectsInScope)
GenerateType\GenerateTypeDialogViewModel.cs (6)
406private Project _selectedProject; 407public Project SelectedProject 416var previousProject = _selectedProject; 495private Project _previouslyPopulatedProject = null; 795public Project Project { get; } 797public ProjectSelectItem(Project project)
Implementation\AbstractEditorFactory.cs (7)
53protected abstract Project GetProjectWithCorrectParseOptionsForProject(Project project, IVsHierarchy hierarchy); 297Project? projectToAddTo = null; 380private static Project AddEditorConfigFiles(Project projectToAddTo, string projectFolder) 395static Project AddEditorConfigFile(Project project, string folder, out bool foundRoot)
Implementation\HierarchyItemToProjectIdMap.cs (2)
67var matchingProject = candidateProjects.FirstOrDefault(p => _workspace.TryGetDependencyNodeTargetIdentifier(p.Id) == targetFrameworkMoniker); 80foreach (var candidateProject in candidateProjects)
Implementation\IHierarchyItemToProjectIdMap.cs (1)
19/// returns the <see cref="ProjectId"/> of the equivalent Roslyn <see cref="Project"/>.
Interactive\VsResetInteractive.cs (2)
112var projectOpt = GetProjectFromHierarchy(hierarchy); 164internal Project GetProjectFromHierarchy(IVsHierarchy hierarchy)
LanguageServer\Handler\Diagnostics\VisualStudioDiagnosticProjectInformationService.cs (1)
19public VSDiagnosticProjectInformation GetDiagnosticProjectInformation(Project project)
LanguageService\AbstractCreateServicesOnTextViewConnection.cs (2)
38protected virtual Task InitializeServiceForProjectWithOpenedDocumentAsync(Project project) 86else if (Workspace.CurrentSolution.GetProject(projectId) is Project project)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (2)
24private readonly Project _project; 33Project project)
Library\ObjectBrowser\AbstractListItemFactory.cs (3)
474var project = solution.GetProject(projectId); 507public async Task<ImmutableHashSet<(ProjectId, IAssemblySymbol)>> GetAssemblySetAsync(Project project, bool lookInReferences, CancellationToken cancellationToken) 599var project = solution.GetProject(projectId);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (8)
64Project project); 184internal Project GetProject(ProjectId projectId) 187internal Project GetProject(ObjectListItem listItem) 201var project = GetProject(projectId); 413var project = GetProject(symbolListItem); 481var project = this.Workspace.CurrentSolution.GetProject(symbolListItem.ProjectId); 507IStreamingFindUsagesPresenter presenter, SymbolListItem symbolListItem, Project project, OptionsProvider<ClassificationOptions> classificationOptions) 537Project project,
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Description.cs (1)
21var project = GetProject(listItem);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_ListItems.cs (1)
29internal Task<ImmutableHashSet<(ProjectId, IAssemblySymbol)>> GetAssemblySetAsync(Project project, bool lookInReferences, CancellationToken cancellationToken)
Library\ObjectBrowser\Extensions.cs (5)
55public static string GetProjectDisplayName(this Project project) 81static bool IsUnambiguousProjectNameInSolution(Project project) 83foreach (var other in project.Solution.Projects) 100public static bool IsVenus(this Project project) 122public static string GetProjectNavInfoName(this Project project)
Library\ObjectBrowser\Lists\ProjectListItem.cs (2)
17public ProjectListItem(Project project) 23private static StandardGlyphGroup GetProjectGlyph(Project project)
Library\ObjectBrowser\ObjectList.cs (5)
494var project = this.LibraryManager.GetProject(listItem.ProjectId); 558var project = this.LibraryManager.GetProject(projectListItem.ProjectId); 681var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(symbolListItem.ProjectId); 751var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(symbolItem.ProjectId); 909var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(projectListItem.ProjectId);
Library\ObjectBrowser\ObjectListItem.cs (1)
75var project = workspace.CurrentSolution.GetProject(ProjectId);
Library\VsNavInfo\NavInfoFactory.cs (7)
21public IVsNavInfo CreateForProject(Project project) 34public IVsNavInfo CreateForSymbol(ISymbol symbol, Project project, Compilation compilation, bool useExpandedHierarchy = false) 63public IVsNavInfo CreateForNamespace(INamespaceSymbol namespaceSymbol, Project project, Compilation compilation, bool useExpandedHierarchy = false) 73public IVsNavInfo CreateForType(ITypeSymbol typeSymbol, Project project, Compilation compilation, bool useExpandedHierarchy = false) 114public IVsNavInfo CreateForMember(ISymbol memberSymbol, Project project, Compilation compilation, bool useExpandedHierarchy = false) 128private IVsNavInfo Create(IAssemblySymbol containingAssembly, Project project, Compilation compilation, bool useExpandedHierarchy = false, 174private static string GetLibraryName(Project project)
Packaging\PackageInstallerServiceFactory.cs (4)
546var project = solution.GetProject(projectId); 656public ImmutableArray<Project> GetProjectsWithInstalledPackage(Solution solution, string packageName, string version) 660using var _ = ArrayBuilder<Project>.GetInstance(out var result); 667var project = solution.GetProject(projectId);
Progression\GraphBuilder.cs (8)
36private readonly Dictionary<GraphNode, Project> _nodeToContextProjectMap = []; 84Project? project = null; 123var project = _solution.GetProject(projectId); 151public Project GetContextProject(GraphNode node, CancellationToken cancellationToken) 155_nodeToContextProjectMap.TryGetValue(node, out var project); 160public ProjectId GetContextProjectId(Project project, ISymbol symbol) 162var thisProject = project.Solution.GetProject(symbol.ContainingAssembly) ?? project; 196ISymbol symbol, Project contextProject, Document contextDocument, CancellationToken cancellationToken)
Progression\GraphNodeIdCreation.cs (2)
405var foundProject = solution.GetProject(containingAssembly, cancellationToken); 423foreach (var project in solution.Projects)
Progression\GraphQueries\SearchGraphQuery.cs (1)
46public INavigateToSearchService? GetNavigateToSearchService(Project project)
ProjectSystem\VisualStudioProjectManagementService.cs (1)
31public string GetDefaultNamespace(Microsoft.CodeAnalysis.Project project, Workspace workspace)
ProjectSystem\VisualStudioWorkspace.cs (3)
64public abstract bool TryGoToDefinition(ISymbol symbol, Project project, CancellationToken cancellationToken); 65public abstract Task<bool> TryGoToDefinitionAsync(ISymbol symbol, Project project, CancellationToken cancellationToken); 67public abstract bool TryFindAllReferences(ISymbol symbol, Project project, CancellationToken cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.AbstractAddDocumentUndoUnit.cs (4)
31var fromProject = currentSolution.GetProject(FromProjectId); 35var updatedProject = AddDocument(fromProject); 40protected abstract Project AddDocument(Project fromProject);
ProjectSystem\VisualStudioWorkspaceImpl.AbstractRemoveDocumentUndoUnit.cs (3)
26protected abstract IReadOnlyList<DocumentId> GetDocumentIds(Project fromProject); 33var fromProject = currentSolution.GetProject(FromProjectId); 38var updatedProject = fromProject.RemoveDocument(DocumentId);
ProjectSystem\VisualStudioWorkspaceImpl.AddAdditionalDocumentUndoUnit.cs (2)
23protected override Project AddDocument(Project fromProject)
ProjectSystem\VisualStudioWorkspaceImpl.AddAnalyzerConfigDocumentUndoUnit.cs (2)
22protected override Project AddDocument(Project fromProject)
ProjectSystem\VisualStudioWorkspaceImpl.AddDocumentUndoUnit.cs (2)
22protected override Project AddDocument(Project fromProject)
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (2)
32var fromProject = currentSolution.GetProject(FromProjectId); 50var updatedProject = fromProject.AddMetadataReference(reference);
ProjectSystem\VisualStudioWorkspaceImpl.AddProjectReferenceUndoUnit.cs (4)
29var fromProject = currentSolution.GetProject(FromProjectId); 30var toProject = currentSolution.GetProject(_toProjectId); 36var updatedProject = fromProject.AddProjectReference(new ProjectReference(_toProjectId)); 44var toProject = currentSolution.GetProject(_toProjectId);
ProjectSystem\VisualStudioWorkspaceImpl.cs (4)
363internal bool IsCPSProject(CodeAnalysis.Project project) 395public override bool CanApplyCompilationOptionChange(CompilationOptions oldOptions, CompilationOptions newOptions, CodeAnalysis.Project project) 398public override bool CanApplyParseOptionChange(ParseOptions oldOptions, ParseOptions newOptions, CodeAnalysis.Project project) 1544internal void RemoveProjectFromMaps(CodeAnalysis.Project project)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveAdditionalDocumentUndoUnit.cs (1)
21protected override IReadOnlyList<DocumentId> GetDocumentIds(Project fromProject)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveAnalyzerConfigDocumentUndoUnit.cs (1)
21protected override IReadOnlyList<DocumentId> GetDocumentIds(Project fromProject)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveDocumentUndoUnit.cs (1)
21protected override IReadOnlyList<DocumentId> GetDocumentIds(Project fromProject)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveMetadataReferenceUndoUnit.cs (2)
31var fromProject = currentSolution.GetProject(FromProjectId); 39var updatedProject = fromProject.RemoveMetadataReference(reference);
ProjectSystem\VisualStudioWorkspaceImpl.RemoveProjectReferenceUndoUnit.cs (4)
29var fromProject = currentSolution.GetProject(FromProjectId); 30var toProject = currentSolution.GetProject(_toProjectId); 36var updatedProject = fromProject.RemoveProjectReference(new ProjectReference(_toProjectId)); 44var toProject = currentSolution.GetProject(_toProjectId);
PullMemberUp\SymbolDependentsBuilder.cs (3)
22Project project, 37private readonly Project _project; 45Project project,
Snippets\SnippetExpansionClient.cs (1)
1078private static void AddReferences(Project originalProject, XElement snippetNode)
SyncNamespaces\SyncNamespacesCommandHandler.cs (2)
116private ImmutableArray<Project> GetProjectsForHierarchy(Shell.Interop.IVsHierarchy projectHierarchy) 126private void SyncNamespaces(ImmutableArray<Project> projects)
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (5)
195Dictionary<string, Project>? projectNameToProjectMap = null; 196Dictionary<Project, ImmutableDictionary<string, Document>>? filePathToDocumentMap = null; 224foreach (var p in _workspace.CurrentSolution.Projects) 231if (!projectNameToProjectMap.TryGetValue(projectName, out var project)) 300private static async Task<ImmutableDictionary<string, Document>> GetFilePathToDocumentMapAsync(Project project, CancellationToken cancellationToken)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (16)
130private static Func<Project, bool> GetShouldFixInProjectDelegate(IVsHierarchyItemManager vsHierarchyItemManager, IHierarchyItemToProjectIdMap projectMap, IVsHierarchy? projectHierarchy) 176Func<Project, bool> shouldFixInProject, 187private bool ApplySuppressionFix(IEnumerable<DiagnosticData>? diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, bool isAddSuppression, bool isSuppressionInSource, bool onlyCompilerDiagnostics, bool showPreviewChangesDialog) 195Func<Project, bool> shouldFixInProject, 233? ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty 427private static ImmutableDictionary<Project, ImmutableArray<Diagnostic>> GetProjectDiagnosticsMappedToNewSolution(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectDiagnosticsToFixMap, Solution newSolution, string language) 429ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Builder? projectDiagsBuilder = null; 435var project = newSolution.GetProject(oldProject.Id); 438projectDiagsBuilder ??= ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>(); 443return projectDiagsBuilder != null ? projectDiagsBuilder.ToImmutable() : ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty; 452private async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken) 544private async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken) 562return ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty; 565var finalBuilder = ImmutableDictionary.CreateBuilder<Project, ImmutableArray<Diagnostic>>();
TaskList\ExternalErrorDiagnosticUpdateSource.cs (2)
222private static RpcContracts.Utilities.ProjectIdentifier? GetProjectIdentifier(Project? project, Guid projectHierarchyGuid) 362var project = Solution.GetProject(projectId);
TaskList\ProjectExternalErrorReporter.cs (1)
88var project = _workspace.CurrentSolution.GetProject(_projectId);
UnusedReferences\Dialog\UnusedReferencesTableProvider.DataSource.cs (1)
36var project = solution.Projects.First(project => projectFilePath.Equals(project.FilePath, StringComparison.OrdinalIgnoreCase));
Workspace\SourceGeneratedFileManager.cs (3)
334var project = this.Workspace.CurrentSolution.GetProject(_documentIdentity.DocumentId.ProjectId); 437var oldProject = e.OldSolution.GetProject(projectId); 438var newProject = e.NewSolution.GetProject(projectId);
Workspace\VisualStudioDocumentNavigationService.cs (1)
195var project = solution.GetProject(documentId.ProjectId);
Workspace\VisualStudioSymbolNavigationService.cs (3)
51ISymbol symbol, Project project, CancellationToken cancellationToken) 128Project project, ISymbol symbol, CancellationToken cancellationToken) 178public async Task<bool> TrySymbolNavigationNotifyAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices.CSharp (7)
EditorConfigSettings\DataProvider\CodeStyle\CSharpCodeStyleSettingsProvider.cs (1)
28protected override void UpdateOptions(TieredAnalyzerConfigOptions options, ImmutableArray<Project> projectsInScope)
EditorConfigSettings\DataProvider\Whitespace\CSharpWhitespaceSettingsProvider.cs (1)
28protected override void UpdateOptions(TieredAnalyzerConfigOptions options, ImmutableArray<Project> projectsInScope)
LanguageService\CSharpCreateServicesOnTextViewConnection.cs (1)
40protected override async Task InitializeServiceForProjectWithOpenedDocumentAsync(Project project)
LanguageService\CSharpEditorFactory.cs (2)
31protected override Project GetProjectWithCorrectParseOptionsForProject(Project project, IVsHierarchy hierarchy)
ObjectBrowser\DescriptionBuilder.cs (1)
22Project project) : AbstractDescriptionBuilder(description, libraryManager, listItem, project)
ObjectBrowser\ObjectBrowserLibraryManager.cs (1)
24Project project)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (8)
CodeModel\AbstractFileCodeElementTests.cs (1)
53protected Microsoft.CodeAnalysis.Project GetCurrentProject()
CodeModel\FileCodeModelTestHelpers.cs (1)
35var project = workspace.CurrentSolution.Projects.Single();
Interactive\Commands\ResetInteractiveTests.cs (3)
51var project = workspace.CurrentSolution.Projects.FirstOrDefault(p => p.AssemblyName == "ResetInteractiveTestsAssembly"); 68Project project, 140private static IEnumerable<string> GetProjectReferences(TestWorkspace workspace, Project project)
PersistentStorage\AbstractPersistentStorageTests.cs (3)
118var project = solution.Projects.First(); 220var project = solution.Projects.Single(); 990var project = solution.Projects.Single();
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
Client\RemoteLanguageServiceWorkspace.cs (1)
317var project = CurrentSolution.Projects.FirstOrDefault(p => p.Name == projectName && p.Language == language);
ProjectsHandler.cs (1)
27foreach (var project in solution.Projects)
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (7)
CodeModel\Mocks\MockVisualStudioWorkspace.vb (3)
68Public Overrides Function TryGoToDefinition(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Boolean 72Public Overrides Function TryGoToDefinitionAsync(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Task(Of Boolean) 76Public Overrides Function TryFindAllReferences(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Boolean
ProjectSystemShim\Framework\ExtensionMethods.vb (1)
11Public Function HasMetadataReference(project As Project, path As String) As Boolean
ProjectSystemShim\Framework\TestEnvironment.vb (3)
110Public Overrides Function TryGoToDefinition(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Boolean 114Public Overrides Function TryGoToDefinitionAsync(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Task(Of Boolean) 118Public Overrides Function TryFindAllReferences(symbol As ISymbol, project As Project, cancellationToken As CancellationToken) As Boolean
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (2)
327Public Function GetDiagnosticsForIdsAsync(solution As Solution, projectId As ProjectId, documentId As DocumentId, diagnosticIds As ImmutableHashSet(Of String), shouldIncludeAnalyzer As Func(Of DiagnosticAnalyzer, Boolean), getDocuments As Func(Of Project, DocumentId, IReadOnlyList(Of DocumentId)), includeSuppressedDiagnostics As Boolean, includeLocalDocumentDiagnostics As Boolean, includeNonLocalDocumentDiagnostics As Boolean, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of DiagnosticData)) Implements IDiagnosticAnalyzerService.GetDiagnosticsForIdsAsync 335Public Function ForceAnalyzeProjectAsync(project As Project, cancellationToken As CancellationToken) As Task Implements IDiagnosticAnalyzerService.ForceAnalyzeProjectAsync
GenerateType\GenerateTypeViewModelTests.vb (1)
879Public Function GetDefaultNamespace(project As Project, workspace As Microsoft.CodeAnalysis.Workspace) As String Implements IProjectManagementService.GetDefaultNamespace
ProjectSystemShim\VisualStudioProjectTests\ProjectSystemProjectFactoryTests.vb (1)
33Dim newProjectInSolution As Project = environment.Workspace.CurrentSolution.GetProject(project1.Id)
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
LanguageService\VisualBasicEditorFactory.vb (2)
27Protected Overrides Function GetProjectWithCorrectParseOptionsForProject(project As Project, hierarchy As IVsHierarchy) As Project
ObjectBrowser\DescriptionBuilder.vb (1)
19project As Project)
ObjectBrowser\ObjectBrowserLibraryManager.vb (1)
21project As Project
Microsoft.VisualStudio.LanguageServices.Xaml (6)
Extensions.cs (1)
26public static Project GetCodeProject(this TextDocument document)
Implementation\LanguageServer\Extensions\SolutionExtensions.cs (1)
14public static IEnumerable<Project> GetXamlProjects(this Solution solution)
Implementation\LanguageServer\Extensions\SymbolExtensions.cs (1)
28var codeProject = document.GetCodeProject();
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (1)
177var project = document.GetCodeProject();
Implementation\LanguageServer\Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
127var project = document.Project;
Implementation\LanguageServer\Handler\Diagnostics\WorkspacePullDiagnosticHandler.cs (1)
46foreach (var project in projects)
Mvc.Api.Analyzers.Test (17)
ActualApiResponseMetadataFactoryTest.cs (4)
69var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 365var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source }); 405var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 425var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
AddResponseTypeAttributeCodeFixProviderIntegrationTest.cs (2)
64var project = GetProject(testMethod); 81private Project GetProject(string testMethod)
ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest.cs (2)
31var project = GetProject(testMethod); 46private Project GetProject(string testMethod)
ApiControllerFactsTest.cs (2)
34var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 129var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
Infrastructure\MvcDiagnosticAnalyzerRunner.cs (4)
22var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, source); 27public static Project CreateProjectWithReferencesInBinDir(Assembly testAssembly, params string[] source) 33var project = DiagnosticProject.Create(testAssembly, source); 46public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
MvcFactsTest.cs (1)
223var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
SymbolApiConventionMatcherTest.cs (1)
556var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
SymbolApiResponseMetadataProviderTest.cs (1)
477var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
Roslyn.VisualStudio.Next.UnitTests (55)
Remote\RemoteHostClientServiceFactoryTests.cs (1)
47var project = workspace.AddProject("proj", LanguageNames.CSharp);
Remote\SnapshotSerializationTests.cs (2)
49var project1 = solution.AddProject("Project", "Project.dll", LanguageNames.CSharp); 53var project2 = document1.Project.Solution.AddProject("Project2", "Project2.dll", LanguageNames.VisualBasic);
Services\AssetProviderTests.cs (1)
127var project = workspace.CurrentSolution.Projects.First();
Services\ServiceHubServicesTests.cs (12)
454var localProject = localWorkspace.CurrentSolution.Projects.Single(); 468static async Task AssertSourceGeneratedDocumentsAreSame(Project localProject, Project remoteProject, int expectedCount) 1483var project = solution.GetProject(projectIds[i]); 1634private static (Project project, Document document) GetProjectAndDocument(Solution solution, string projectName, string documentName) 1636var project = solution.Projects.First(p => string.Equals(p.Name, projectName, StringComparison.OrdinalIgnoreCase)); 1642private static (Project project, ImmutableArray<Document> documents) GetProjectAndDocuments(Solution solution, string projectName, ImmutableArray<string> documentNames) 1644var project = solution.Projects.First(p => string.Equals(p.Name, projectName, StringComparison.OrdinalIgnoreCase)); 1727var project = solution.AddProject(projectName, $"{projectName}.dll", language) 1736var current = solution.GetProject(projectId); 1742var current = solution.GetProject(projectId); 1748var current = solution.GetProject(projectId);
Services\SolutionServiceTests.cs (36)
269var project = solution.Projects.Single(); 310var project = s.GetProject(existingProjectId); 550var project1 = solution.Projects.Single(); 551var project2 = solution.AddProject("P2", "P2", LanguageNames.CSharp); 591var project1 = solution.Projects.Single(); 592var project2 = solution.AddProject("P2", "P2", LanguageNames.CSharp); 632var project1 = solution.Projects.Single(); 633var project2 = solution.AddProject("P2", "P2", LanguageNames.CSharp); 634var project3 = project2.Solution.AddProject("P3", "P3", LanguageNames.CSharp); 665var project1 = solution.Projects.Single(); 666var project2 = solution.AddProject("P2", "P2", LanguageNames.CSharp); 667var project3 = project2.Solution.AddProject("P3", "P3", LanguageNames.CSharp); 706var project1 = solution.Projects.Single(); 707var project2 = solution.AddProject("P2", "P2", LanguageNames.CSharp); 708var project3 = project2.Solution.AddProject("P3", "P3", LanguageNames.CSharp); 746var project1 = solution.Projects.Single(); 747var project2 = solution.AddProject("P2", "P2", LanguageNames.CSharp); 748var project3 = project2.Solution.AddProject("P3", "P3", LanguageNames.CSharp); 786var project1 = solution.Projects.Single(); 787var project2 = solution.AddProject("P2", "P2", LanguageNames.VisualBasic); 819var project1 = solution.Projects.Single(); 820var project2 = solution.AddProject("P2", "P2", LanguageNames.VisualBasic); 874var project1 = solution.Projects.Single(); 875var project2 = solution.AddProject("P2", "P2", LanguageNames.CSharp); 920var project1 = solution.Projects.Single(); 943var project1 = solution.Projects.Single(); 944var project2 = solution.AddProject("P2", "P2", LanguageNames.CSharp); 988var project1 = solution.Projects.Single(); 1007var project1 = solution.Projects.Single(); 1039var project1 = solution.Projects.Single(); 1077var project1 = solution.Projects.Single(p => p.AssemblyName == "Assembly1"); 1078var project2 = solution.Projects.Single(p => p.AssemblyName == "Assembly2"); 1103var project1 = solution.Projects.Single(); 1130var project1 = solution.Projects.Single(); 1159var project1 = solution.Projects.Single(); 1206var project1 = solution.Projects.Single();
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (3)
158var project = workspace.CurrentSolution.Projects.First(); 196var project = workspace.CurrentSolution.Projects.First().AddAnalyzerReference(analyzerReference); 229var project = solution.GetProject(projectId);