23 references to WithProjectParseOptions
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (1)
95
return project.Solution.
WithProjectParseOptions
(project.Id, parseOptions.WithLanguageVersion(parsedNewVersion));
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (1)
95
return project.Solution.
WithProjectParseOptions
(project.Id, parseOptions.WithLanguageVersion(parsedNewVersion));
Microsoft.CodeAnalysis.Workspaces (3)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
371
set => 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)
275
solution = 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),
1775
Assert.Throws<ArgumentNullException>("projectId", () => solution.
WithProjectParseOptions
(null!, options));
1776
Assert.Throws<ArgumentNullException>("options", () => solution.
WithProjectParseOptions
(projectId, options: null!));
1777
Assert.Throws<InvalidOperationException>(() => solution.
WithProjectParseOptions
(ProjectId.CreateNewId(), options));
2363
WithProjectParseOptions
(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script));
2389
WithProjectParseOptions
(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script));
2419
WithProjectParseOptions
(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script));
2448
WithProjectParseOptions
(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script));
2477
WithProjectParseOptions
(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script));
2508
WithProjectParseOptions
(projectId, new CSharpParseOptions(kind: SourceCodeKind.Script));
3047
solution = solution.
WithProjectParseOptions
(project1, newParseOptions);
4417
currentSolution = currentSolution.
WithProjectParseOptions
(document1.Project.Id, options.WithPreprocessorSymbols("X"));
Microsoft.ML.CodeAnalyzer.Tests (1)
Helpers\CSharpCodeFixVerifier`2.cs (1)
73
solution = solution.
WithProjectParseOptions
(projectId, parseOptions.WithLanguageVersion(LanguageVersion.Value));