23 references to WithProjectParseOptions
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (1)
95return project.Solution.WithProjectParseOptions(project.Id, parseOptions.WithLanguageVersion(parsedNewVersion));
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (1)
95return project.Solution.WithProjectParseOptions(project.Id, parseOptions.WithLanguageVersion(parsedNewVersion));
Microsoft.CodeAnalysis.Workspaces (3)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
371set => ChangeProjectProperty(ref _parseOptions, value, s => s.WithProjectParseOptions(Id, value), logThrowAwayTelemetry: true);
Workspace\Solution\Project.cs (1)
606=> this.Solution.WithProjectParseOptions(this.Id, options).GetRequiredProject(Id);
Workspace\Workspace.cs (1)
870=> SetCurrentSolution(oldSolution => oldSolution.WithProjectParseOptions(projectId, options), WorkspaceChangeKind.ProjectChanged, projectId);
Microsoft.CodeAnalysis.Workspaces.UnitTests (17)
SolutionTests\SolutionTests.cs (17)
81.AddProject(projectId1, "proj1", "proj1.dll", LanguageNames.CSharp).WithProjectParseOptions(projectId1, parseOptions1) 85.AddProject(projectId2, "proj2", "proj2.dll", LanguageNames.CSharp).WithProjectParseOptions(projectId2, parseOptions2) 275solution = solution.WithProjectParseOptions(projectId, CSharpParseOptions.Default.WithKind(SourceCodeKind.Script)); 842.AddProject(projectId1, "proj1", "proj1.dll", LanguageNames.CSharp).WithProjectParseOptions(projectId1, parseOptions1) 844.AddProject(projectId2, "proj2", "proj2.dll", LanguageNames.VisualBasic).WithProjectParseOptions(projectId2, parseOptions2) 1770(s, value) => s.WithProjectParseOptions(projectId, value), 1775Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectParseOptions(null!, options)); 1776Assert.Throws<ArgumentNullException>("options", () => solution.WithProjectParseOptions(projectId, options: null!)); 1777Assert.Throws<InvalidOperationException>(() => solution.WithProjectParseOptions(ProjectId.CreateNewId(), options)); 2363WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2389WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2419WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2448WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2477WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 2508WithProjectParseOptions(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script)); 3047solution = solution.WithProjectParseOptions(project1, newParseOptions); 4417currentSolution = currentSolution.WithProjectParseOptions(document1.Project.Id, options.WithPreprocessorSymbols("X"));
Microsoft.ML.CodeAnalyzer.Tests (1)
Helpers\CSharpCodeFixVerifier`2.cs (1)
73solution = solution.WithProjectParseOptions(projectId, parseOptions.WithLanguageVersion(LanguageVersion.Value));