56 instantiations of Solution
Microsoft.CodeAnalysis.Workspaces (56)
Workspace\Solution\Solution.cs (55)
335return new Solution(newState); 349return new Solution(newState); 371return new Solution(newState); 387return new Solution(newState); 403return new Solution(newState); 419return new Solution(newState); 435return new Solution(newState); 451return new Solution(newState); 472return new Solution(newState); 488return new Solution(newState); 510return new Solution(newState); 532return new Solution(newState); 550return new Solution(newState); 568return new Solution(newState); 595return new Solution(newState); 649return new Solution(newState); 674return new Solution(newState); 703return new Solution(newState); 752return new Solution(newState); 778return new Solution(newState); 802return new Solution(newState); 855return new Solution(newState); 881return new Solution(newState); 905return new Solution(newState); 946return new Solution(newState); 968return new Solution(newState); 986return new Solution(newState); 1106return new Solution(newState); 1152return new Solution(newState); 1212return new Solution(newState); 1241return new Solution(newState); 1270return new Solution(newState); 1299return new Solution(newState); 1320return new Solution(newState); 1339return new Solution(newState); 1363return new Solution(newState); 1390return new Solution(newState); 1417return new Solution(newState); 1444return new Solution(newState); 1471return new Solution(newState); 1498return new Solution(newState); 1525return new Solution(newState); 1552return new Solution(newState); 1558return newState == _state ? this : new Solution(newState); 1587return new Solution(newState); 1614return new Solution(newState); 1641return new Solution(newState); 1668return new Solution(newState); 1682return new Solution(newState); 1710return new Solution(newState); 1750return new Solution(newState); 1761var newSolution = newState != _state ? new Solution(newState) : this; 1780return new Solution(newState); 1799return new Solution(newState); 1862return new Solution(newState);
Workspace\Workspace.cs (1)
123=> new(this, solutionInfo.Attributes, options, analyzerReferences);
3121 references to Solution
AnalyzerRunner (9)
CodeRefactoringRunner.cs (2)
53var solution = _workspace.CurrentSolution; 54var updatedSolution = solution;
DiagnosticAnalyzerRunner.cs (5)
39private static Solution SetOptions(Solution solution) 65var solution = _workspace.CurrentSolution; 79var solution = _workspace.CurrentSolution; 316Solution solution,
Program.cs (2)
136private static async Task ShowCompilerDiagnosticsAsync(Solution solution, CancellationToken cancellationToken) 174private static void ShowSolutionStatistics(Solution solution, CancellationToken cancellationToken)
IdeBenchmarks (3)
InheritanceMargin\BenchmarksHelpers.cs (1)
19Solution solution,
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
24private Solution _solution;
SQLitePersistentStorageBenchmark.cs (1)
69var solution = _workspace.CurrentSolution;
IdeCoreBenchmarks (10)
ClassificationBenchmarks.cs (1)
34Solution _solution;
FindReferencesBenchmarks.cs (1)
30Solution _solution;
FormatterBenchmarks.cs (1)
49var solution = new AdhocWorkspace().CurrentSolution
IncrementalSourceGeneratorBenchmarks.cs (1)
98var solution = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result;
NavigateToBenchmarks.cs (1)
95var solution = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result;
ProjectOperationBenchmarks.cs (4)
58var solution = _workspace.CurrentSolution; 63static Project CreateProject(ref Solution solution, string name, int documentCount) 107var solution = Project.Solution; 111var _ = solution.WithDocumentText(documentId, s_newText);
RenameBenchmarks.cs (1)
21private Solution _solution;
Microsoft.CodeAnalysis.CodeStyle.Fixes (70)
AbstractAddParameterCodeFixProvider.cs (2)
334? new Func<CancellationToken, Task<Solution>>(c => FixAsync(document, methodToUpdate, argumentToInsert, arguments, fixAllReferences: true, c)) 364private async Task<Solution> FixAsync(
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (2)
43private static async Task<Solution> FixAllInDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CodeActionOptionsProvider options, CancellationToken cancellationToken) 67var newSolution = await renameActionSet.UpdateSolutionAsync(documentWithInvalidFolders.Project.Solution, cancellationToken).ConfigureAwait(false);
AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (3)
72private static async Task<Solution> FixAllByDocumentAsync( 73Solution solution, 90var newSolution = solution;
AbstractCodeGenerationService_FindDeclaration.cs (5)
24public bool CanAddTo(ISymbol destination, Solution solution, CancellationToken cancellationToken) 54public bool CanAddTo(SyntaxNode destination, Solution solution, CancellationToken cancellationToken) 57private bool CanAddTo(SyntaxNode? destination, Solution solution, CancellationToken cancellationToken, 127Solution solution, 137Solution solution,
AbstractMakeMethodAsynchronousCodeFixProvider.cs (5)
102private async Task<Solution> FixNodeAsync( 154private async Task<Solution> RenameThenAddAsyncTokenAsync( 164var solution = document.Project.Solution; 170var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 184private async Task<Solution> AddAsyncTokenAsync(
AbstractMakeMethodSynchronousCodeFixProvider.cs (12)
51private async Task<Solution> FixNodeAsync( 73private async Task<Solution> RenameThenRemoveAsyncTokenAsync(Document document, SyntaxNode node, IMethodSymbol methodSymbol, CancellationToken cancellationToken) 77var solution = document.Project.Solution; 83var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 96private async Task<Solution> RemoveAsyncTokenAsync( 110var newSolution = newDocument.Project.Solution; 119private static async Task<Solution> RemoveAwaitFromCallersAsync( 154private static async Task<Solution> RemoveAwaitFromCallersAsync( 155Solution solution, ImmutableArray<ReferenceLocation> locations, CancellationToken cancellationToken) 157var currentSolution = solution; 170private static async Task<Solution> RemoveAwaitFromCallersAsync( 171Solution currentSolution, IGrouping<Document, ReferenceLocation> group, CancellationToken cancellationToken)
AbstractUnsealClassCodeFixProvider.cs (2)
57private static async Task<Solution> UnsealDeclarationsAsync( 58Solution solution, ImmutableArray<SyntaxReference> declarationReferences, CancellationToken cancellationToken)
AbstractUpgradeProjectCodeFixProvider.cs (9)
22public abstract Solution UpgradeProject(Project project, string version); 44var solution = project.Solution; 76public Solution UpgradeAllProjects(Solution solution, string language, string version, CancellationToken cancellationToken) 78var currentSolution = solution; 103private readonly Func<CancellationToken, Task<Solution>> _createChangedSolution; 105private ProjectOptionsChangeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) 111public static ProjectOptionsChangeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) 117protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
AddParameterService.cs (2)
73public static async Task<Solution> AddParameterAsync( 83var solution = invocationDocument.Project.Solution;
CodeFixData.cs (4)
15Func<CancellationToken, Task<Solution>> createChangedSolutionNonCascading, 16Func<CancellationToken, Task<Solution>>? createChangedSolutionCascading) 31public Func<CancellationToken, Task<Solution>> CreateChangedSolutionNonCascading { get; } 36public Func<CancellationToken, Task<Solution>>? CreateChangedSolutionCascading { get; }
CodeGenerationContext.cs (1)
15Solution Solution,
CodeGenerator.cs (1)
92public static bool CanAdd(Solution solution, ISymbol destination, CancellationToken cancellationToken)
CustomCodeActions.cs (3)
68private readonly Func<CancellationToken, Task<Solution>> _createChangedSolution; 72Func<CancellationToken, Task<Solution>> createChangedSolution, 79protected sealed override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
DocumentExtensions.cs (1)
200var solution = document.Project.Solution;
ICodeGenerationService.cs (3)
179bool CanAddTo(ISymbol destination, Solution solution, CancellationToken cancellationToken); 184bool CanAddTo(SyntaxNode destination, Solution solution, CancellationToken cancellationToken); 192Task<SyntaxNode?> FindMostRelevantNameSpaceOrTypeDeclarationAsync(Solution solution, INamespaceOrTypeSymbol namespaceOrType, Location? location, CancellationToken cancellationToken);
ISolutionExtensions.cs (9)
14public static IEnumerable<DocumentId> GetChangedDocuments(this Solution? newSolution, Solution oldSolution) 30public static TextDocument? GetTextDocument(this Solution solution, DocumentId? documentId) 33public static Document GetRequiredDocument(this Solution solution, SyntaxTree syntaxTree) 36public static Project GetRequiredProject(this Solution solution, ProjectId projectId) 47public static Document GetRequiredDocument(this Solution solution, DocumentId documentId) 58public static TextDocument GetRequiredAdditionalDocument(this Solution solution, DocumentId documentId) 61public static TextDocument GetRequiredAnalyzerConfigDocument(this Solution solution, DocumentId documentId) 64public static TextDocument GetRequiredTextDocument(this Solution solution, DocumentId documentId)
NamingStyleCodeFixProvider.cs (4)
106private static async Task<Solution> FixAsync( 123private readonly Func<CancellationToken, Task<Solution>> _createChangedSolutionAsync; 140Func<CancellationToken, Task<Solution>> createChangedSolutionAsync, 160var newSolution = await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false);
ParsedDocument.cs (1)
23/// In general, any feature API that accepts <see cref="ParsedDocument"/> should be synchronous and not access <see cref="Document"/> or <see cref="Solution"/> snapshots.
SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (19)
AbstractCodeActionOrUserDiagnosticTest.cs (19)
196var newSolution = workspace.CurrentSolution; 236var newSolution = workspace.CurrentSolution; 567internal async Task<Tuple<Solution, Solution>> TestActionAsync( 582protected static async Task<Tuple<Solution, Solution>> TestOperationsAsync( 593var oldSolution = appliedChanges.Item1; 594var newSolution = appliedChanges.Item2; 598var newSolutionWithLinkedFiles = await newSolution.WithMergedLinkedFileChangesAsync(oldSolution); 643protected static Document GetDocumentToVerify(DocumentId expectedChangedDocumentId, Solution oldSolution, Solution newSolution) 664private static async Task VerifyAgainstWorkspaceDefinitionAsync(string expectedText, Solution newSolution, TestComposition composition) 668var expectedSolution = expectedWorkspace.CurrentSolution; 763protected static async Task<Tuple<Solution, Solution>> ApplyOperationsAndGetSolutionAsync( 767Tuple<Solution, Solution> result = null; 776var oldSolution = workspace.CurrentSolution; 778var newSolution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (3)
SharedVerifierState.cs (3)
33private Func<Solution, ProjectId, Solution>? _remainingOptionsSolutionTransform; 45/// Gets a collection of options to apply to <see cref="Solution.Options"/> for testing. Values may be added
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
ConvertToRecordEngine.cs (1)
77private static async Task<Solution> ConvertToPositionalRecordAsync(
CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
43private static Solution AllowUnsafeOnProject(Project project)
CSharpUpgradeProjectCodeFixProvider.cs (1)
91public override Solution UpgradeProject(Project project, string newVersion)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (2)
UpgradeProjectTests.cs (2)
47var oldSolution = appliedChanges.Item1; 48var newSolution = appliedChanges.Item2;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (2)
131var solutionWithEventHandler = CreateSolutionWithEventHandler( 151private Solution CreateSolutionWithEventHandler(
GoToBase\CSharpGoToBaseService.cs (1)
27Solution solution, IMethodSymbol constructor, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (156)
AddUsing\AddUsingNuGetTests.cs (4)
210installerServiceMock.Setup(i => i.GetProjectsWithInstalledPackage(It.IsAny<Solution>(), "NuGetPackage", "1.0")).Returns(ImmutableArray<Project>.Empty); 211installerServiceMock.Setup(i => i.GetProjectsWithInstalledPackage(It.IsAny<Solution>(), "NuGetPackage", "2.0")).Returns(ImmutableArray<Project>.Empty); 287installerServiceMock.Setup(i => i.GetProjectsWithInstalledPackage(It.IsAny<Solution>(), "NuGetPackage", "1.0")).Returns(ImmutableArray<Project>.Empty); 320installerServiceMock.Setup(i => i.GetProjectsWithInstalledPackage(It.IsAny<Solution>(), "NuGetPackage", "1.0")).Returns(ImmutableArray<Project>.Empty);
CodeActions\ApplyChangesOperationTests.cs (24)
23=> new MyCodeRefactoringProvider((Func<Solution, Solution>)parameters.fixProviderData); 27private readonly Func<Solution, Solution> _changeSolution; 29public MyCodeRefactoringProvider(Func<Solution, Solution> changeSolution) 43private readonly Solution _changedSolution; 45public TestCodeAction(Solution changedSolution) 52protected override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 53=> Task.FromResult<Solution?>(_changedSolution); 218Func<Solution, Solution> codeActionTransform, 219Func<Solution, Solution> intermediaryTransform) 226Func<Solution, Solution> codeActionTransform, 227Func<Solution, Solution> intermediaryTransform) 234Func<Solution, Solution> codeActionTransform, 235Func<Solution, Solution> intermediaryTransform, 241var originalSolution = workspace.CurrentSolution; 256var changedSolution = intermediaryTransform(originalSolution);
CodeActions\EnableNullable\EnableNullableTests.cs (6)
23private static readonly Func<Solution, ProjectId, Solution> s_enableNullableInFixedSolution = 39private static readonly Func<Solution, ProjectId, Solution> s_enableNullableInFixedSolutionFromRestoreKeyword = 55private static readonly Func<Solution, ProjectId, Solution> s_enableNullableInFixedSolutionFromDisableKeyword =
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (1)
925var modifiedSolution = await moveTypeService.GetModifiedSolutionAsync(documentToModify, textSpan, MoveTypeOperationKind.MoveTypeNamespaceScope, CodeActionOptions.DefaultProvider, CancellationToken.None).ConfigureAwait(false);
CodeActions\Preview\ErrorCases\ExceptionInCodeAction.cs (1)
52protected override Task<Solution> GetChangedSolutionAsync(CancellationToken cancellationToken)
CodeActions\Preview\PreviewTests.cs (2)
72protected override Task<Solution> GetChangedSolutionAsync(CancellationToken cancellationToken) 74var solution = _oldDocument.Project.Solution;
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (10)
79var oldSolution = result.Item1; 80var newSolution = result.Item2; 105async Task<List<Tuple<Solution, Solution>>> TestOperationAsync( 110var results = new List<Tuple<Solution, Solution>>(); 161var oldSolution = oldAndNewSolution.Item1; 162var newSolution = oldAndNewSolution.Item2; 219async Task<Tuple<Solution, Solution>> TestOperationAsync(TestParameters parameters, TestWorkspace workspace)
CodeGeneration\SyntaxGeneratorTests.cs (2)
36var solution = workspace.CurrentSolution; 70var solution = workspace.CurrentSolution;
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (3)
2482var solution = testWorkspace.CurrentSolution; 2739var solution = testWorkspace.CurrentSolution; 2795var solution = testWorkspace.CurrentSolution;
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (2)
4545private static void AddSolutionTransform(List<Func<Solution, ProjectId, Solution>> solutionTransforms)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
58var newSolution = workspace.CurrentSolution.WithAnalyzerReferences(new[] { analyzerReference })
Diagnostics\Suppression\SuppressionTests.cs (4)
761var solution = workspace.CurrentSolution; 765var updatedSolution = solution.WithProjectCompilationOptions(solution.ProjectIds.Single(), compilationOptions); 1003var solution = workspace.CurrentSolution; 1007var updatedSolution = solution.WithProjectCompilationOptions(solution.ProjectIds.Single(), compilationOptions);
EditAndContinue\ActiveStatementTrackingServiceTests.cs (1)
186var solution = workspace.CurrentSolution;
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (25)
41private static Solution AddDefaultTestProject(Solution solution, string source) 302var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 308var newSolution = oldSolution.WithDocumentText(documentId, SourceText.From(source2)); 369var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 373var newSolution = oldSolution.WithDocumentText(documentId, SourceText.From(source2)); 396var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source); 430var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 435var newSolution = oldSolution.WithDocumentText(documentId, SourceText.From(source2)); 463var oldSolution = workspace.CurrentSolution. 512var oldSolution = workspace.CurrentSolution; 517var newSolution = workspace.CurrentSolution.WithDocumentText(documentId, SourceText.From(source2)); 543var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source); 581var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 586var newSolution = oldSolution.WithDocumentText(documentId, SourceText.From(source2)); 620var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 625var newSolution = oldSolution.WithDocumentText(documentId, SourceText.From(source2)); 661var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 666var newSolution = oldSolution.AddDocument(newDocId, "goo.cs", SourceText.From(source2), filePath: Path.Combine(TempRoot.Root, "goo.cs")); 708var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 712var newSolution = oldSolution.AddDocument(newDocId, "goo.cs", SourceText.From(source2), filePath: Path.Combine(TempRoot.Root, "goo.cs")); 742var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 745var newSolution = oldSolution.AddDocument(documentId, "goo.cs", SourceText.From(source2), filePath: filePath); 796var oldSolution = AddDefaultTestProject(workspace.CurrentSolution, source1); 800var newSolution = oldSolution.WithDocumentText(documentId, SourceText.From(source2));
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (4)
53var solution = workspace.CurrentSolution; 56var newSolution1 = solution.WithAnalyzerConfigDocumentText(documentId, text, PreservationMode.PreserveIdentity); 363var solution = workspace.CurrentSolution; 367var newSolution = solution.WithAnalyzerConfigDocumentText(editorconfig.Id, text);
ExtractMethod\ExtractMethodTests.cs (1)
11249var solution = new AdhocWorkspace().CurrentSolution;
Formatting\CodeCleanupTests.cs (1)
823var solution = workspace.CurrentSolution.WithAnalyzerReferences(new[]
Formatting\CodeCleanupTests.TestFixers.cs (2)
87var solution = fixAllContext.Solution; 143var solution = fixAllContext.Solution;
SymbolKey\SymbolKeyTests.cs (6)
44var solution = workspace.CurrentSolution; 79var solution = workspace.CurrentSolution; 118var solution = workspace.CurrentSolution; 163var solution = workspace.CurrentSolution; 194var solution = workspace.CurrentSolution; 302(ProjectId bodyLocalProjectId, ProjectId referenceAssemblyProjectId) GetOriginatingProjectIds(Solution solution, ISymbol bodyLocalSymbol, ISymbol referenceAssemblySymbol)
UpgradeProjectTests.cs (2)
47var oldSolution = appliedChanges.Item1; 48var newSolution = appliedChanges.Item2;
Workspaces\WorkspaceTests_EditorFeatures.cs (54)
64var solution = workspace.CurrentSolution; 86var solution = workspace.CurrentSolution; 102var solution = workspace.CurrentSolution; 117var solution = workspace.CurrentSolution; 133var solution = workspace.CurrentSolution; 144var solution = workspace.CurrentSolution; 158var solution = workspace.CurrentSolution; 183var solution = workspace.CurrentSolution; 239var currentSnapshot = workspaceSnapshotBuilder.CurrentSolution; 245private static async Task<TypeDeclarationSyntax> GetRootTypeDeclarationAsync(Solution currentSnapshot) 257var solution = workspace.CurrentSolution; 271var solution = workspace.CurrentSolution; 282var snapshot = workspace.CurrentSolution; 293var solution = workspace.CurrentSolution; 310var solution = workspace.CurrentSolution; 321var snapshot = workspace.CurrentSolution; 332var solution = workspace.CurrentSolution; 349var solution = workspace.CurrentSolution; 366var solution = workspace.CurrentSolution; 381var solution = workspace.CurrentSolution; 400var solution = workspace.CurrentSolution; 408var snapshot = workspace.CurrentSolution; 419var solution = workspace.CurrentSolution; 430var snapshot = workspace.CurrentSolution; 443var solution = workspace.CurrentSolution; 454var snapshot = workspace.CurrentSolution; 467var solutionX = workspace.CurrentSolution; 478var solutionY = workspace.CurrentSolution; 496var solutionZ = workspace.CurrentSolution; 512var solutionX = workspace.CurrentSolution; 523var solutionY = workspace.CurrentSolution; 547var cs = workspace.CurrentSolution; 569var solutionX = workspace.CurrentSolution; 580var solutionY = workspace.CurrentSolution; 607var cs = workspace.CurrentSolution; 634var solution = workspace.CurrentSolution; 673var oldSolution = workspace.CurrentSolution; 674var newSolution = oldSolution.WithDocumentText(document.Id, SourceText.From(newText)); 701var oldSolution = workspace.CurrentSolution; 702var newSolution = oldSolution.AddDocument(DocumentId.CreateNewId(project1.Id), "Doc2", SourceText.From(doc2Text)); 722var oldSolution = workspace.CurrentSolution; 723var newSolution = oldSolution.RemoveDocument(document.Id); 1050var oldSolution = workspace.CurrentSolution; 1051var newSolution = oldSolution.WithAdditionalDocumentText(additionalDoc.Id, SourceText.From(newText)); 1083var oldSolution = workspace.CurrentSolution; 1084var newSolution = oldSolution.WithAnalyzerConfigDocumentText(analyzerConfigDoc.Id, SourceText.From(newText)); 1169var oldSolution = workspace.CurrentSolution; 1170var newSolution = oldSolution.AddAdditionalDocument(newDocId, "app.config", "text"); 1205var oldSolution = workspace.CurrentSolution; 1206var newSolution = oldSolution.AddAnalyzerConfigDocument(newDocId, "app.config", SourceText.From("text")); 1392var solution = workspace1.CurrentSolution; 1400var newSolution = solution.WithOptions(newOptions); 1429var beforeSolutionForPrimaryWorkspace = primaryWorkspace.CurrentSolution; 1430var beforeSolutionForSecondaryWorkspace = secondaryWorkspace.CurrentSolution;
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
59var solution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.CSharp.Features (26)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (5)
67private static async Task<Solution> EnableNullableReferenceTypesAsync(Project project, CodeActionPurpose purpose, CodeActionOptionsProvider fallbackOptions, CancellationToken cancellationToken) 69var solution = project.Solution; 259private readonly Func<CodeActionPurpose, CancellationToken, Task<Solution>> _createChangedSolution; 261public CustomCodeAction(Func<CodeActionPurpose, CancellationToken, Task<Solution>> createChangedSolution) 272var changedSolution = await _createChangedSolution(CodeActionPurpose.Preview, cancellationToken).ConfigureAwait(false);
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.FixAllProvider.cs (5)
39async Task<Solution> EnableNullableReferenceTypesInSolutionAsync(CodeActionPurpose purpose, CancellationToken cancellationToken) 41var solution = fixAllContext.Solution; 58private readonly Func<CodeActionPurpose, CancellationToken, Task<Solution>> _createChangedSolution; 60public FixAllCodeAction(Func<CodeActionPurpose, CancellationToken, Task<Solution>> createChangedSolution) 71var changedSolution = await _createChangedSolution(CodeActionPurpose.Preview, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
65var solution = document.Project.Solution;
ConvertToRecordEngine.cs (1)
77private static async Task<Solution> ConvertToPositionalRecordAsync(
CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
43private static Solution AllowUnsafeOnProject(Project project)
CSharpUpgradeProjectCodeFixProvider.cs (1)
91public override Solution UpgradeProject(Project project, string newVersion)
Debugging\BreakpointResolver.cs (1)
22public BreakpointResolver(Solution solution, string text)
Debugging\CSharpBreakpointResolutionService.cs (1)
54public Task<IEnumerable<BreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken)
ExtractInterface\CSharpExtractInterfaceService.cs (2)
70protected override Task<Solution> UpdateMembersWithExplicitImplementationsAsync( 71Solution unformattedSolution, IReadOnlyList<DocumentId> documentIds,
GenerateType\CSharpGenerateTypeService.cs (2)
766internal override async Task<Solution> TryAddUsingsOrImportToDocumentAsync( 767Solution updatedSolution, SyntaxNode modifiedRoot, Document document, SimpleNameSyntax simpleName, string includeUsingsOrImports, AddImportPlacementOptionsProvider fallbackOptions, CancellationToken cancellationToken)
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (2)
208private async Task<Solution> ChangeImplementationAsync( 211var solution = project.Solution;
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
49var solution = project.Solution;
NavigationBar\CSharpNavigationBarItemService.cs (3)
58Solution solution, SyntaxTree tree, IEnumerable<INamedTypeSymbol> types, CancellationToken cancellationToken) 187Solution solution, ISymbol member, SyntaxTree tree, CancellationToken cancellationToken) 202Solution solution, ISymbol symbol, SyntaxTree tree, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Rename\CSharpRenameRewriterLanguageService.cs (4)
52private readonly Solution _solution; 794Solution baseSolution, 795Solution newSolution, 938private static async Task<ISymbol?> GetVBPropertyFromAccessorOrAnOverrideAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (29)
CodeGeneration\SymbolEditorTests.cs (29)
31private static Solution GetSolution(params string[] sources) 48private static async Task<IEnumerable<ISymbol>> GetSymbolsAsync(Solution solution, string name) 78var solution = GetSolution(code); 110var solution = GetSolution(code); 147var solution = GetSolution(code); 191var solution = GetSolution(code); 237var solution = GetSolution(code1, code2); 279var solution = GetSolution(code); 315var solution = GetSolution(code1, code2); 354var solution = GetSolution(code); 391var solution = GetSolution(code); 432var solution = GetSolution(code); 478var solution = GetSolution(code); 528var solution = GetSolution(code); 555var solution = GetSolution(code); 592var solution = GetSolution(code); 619var solution = GetSolution(code); 649var solution = GetSolution(code); 678var solution = GetSolution(code); 710var solution = GetSolution(code); 761var solution = GetSolution(code); 802var solution = GetSolution(code); 835var solution = GetSolution(code); 868var solution = GetSolution(code); 901var solution = GetSolution(code); 942var solution = GetSolution(code); 975var solution = GetSolution(code); 1000var solution = GetSolution(code); 1032var solution = GetSolution(code);
Microsoft.CodeAnalysis.EditorFeatures (116)
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (2)
107private static void HandleResult(ChangeSignatureResult result, Solution oldSolution, Workspace workspace, CommandExecutionContext context) 125var finalSolution = result.UpdatedSolution;
CodeActions\CodeActionEditHandlerService.cs (10)
66var oldSolution = workspace.CurrentSolution; 67var newSolution = await applyChanges.ChangedSolution.WithMergedLinkedFileChangesAsync( 104Solution originalSolution, 129var oldSolution = workspace.CurrentSolution; 190var updatedSolution = operations.OfType<ApplyChangesOperation>().FirstOrDefault()?.ChangedSolution ?? oldSolution; 197Solution oldSolution, ImmutableArray<CodeActionOperation> operationsList) 206var newSolution = applyOperation.ChangedSolution; 272Solution originalSolution, 302Solution oldSolution, 303Solution newSolution,
CodeActions\ICodeActionEditHandlerService.cs (1)
22Solution originalSolution,
EditAndContinue\ActiveStatementTrackingService.cs (6)
68public void StartTracking(Solution solution, IActiveStatementSpanProvider spanProvider) 92public ValueTask<ImmutableArray<ActiveStatementSpan>> GetSpansAsync(Solution solution, DocumentId? documentId, string filePath, CancellationToken cancellationToken) 169var compileTimeSolution = _compileTimeSolutionProvider.GetCompileTimeSolution(designTimeDocument.Project.Solution); 189internal async Task TrackActiveSpansAsync(Solution solution) 309public async ValueTask<ImmutableArray<ActiveStatementSpan>> GetSpansAsync(Solution solution, DocumentId? documentId, string filePath, CancellationToken cancellationToken) 350var solution = document.Project.Solution;
EditAndContinue\EditAndContinueDiagnosticAnalyzer.cs (2)
69var designTimeSolution = designTimeDocument.Project.Solution; 70var compileTimeSolution = workspace.Services.GetRequiredService<ICompileTimeSolutionProvider>().GetCompileTimeSolution(designTimeSolution);
EditAndContinue\EditAndContinueLanguageService.cs (17)
40private Solution? _pendingUpdatedDesignTimeSolution; 41private Solution? _committedDesignTimeSolution; 43public event Action<Solution>? SolutionCommitted; 81private Solution GetCurrentCompileTimeSolution(Solution? currentDesignTimeSolution = null) 119var currentSolution = workspace.CurrentSolution; 121var solution = GetCurrentCompileTimeSolution(currentSolution); 151var solution = GetCurrentCompileTimeSolution(); 218var committedDesignTimeSolution = Interlocked.Exchange(ref _pendingUpdatedDesignTimeSolution, null); 266var solution = GetCurrentCompileTimeSolution(); 281private ActiveStatementSpanProvider GetActiveStatementSpanProvider(Solution solution) 310var oldSolution = _committedDesignTimeSolution; 311var newSolution = WorkspaceProvider.Value.Workspace.CurrentSolution; 331var designTimeSolution = workspace.CurrentSolution; 332var solution = GetCurrentCompileTimeSolution(designTimeSolution); 350var solution = GetCurrentCompileTimeSolution(); 369var solution = GetCurrentCompileTimeSolution();
EditAndContinue\IActiveStatementTrackingService.cs (2)
16void StartTracking(Solution solution, IActiveStatementSpanProvider spanProvider); 29ValueTask<ImmutableArray<ActiveStatementSpan>> GetSpansAsync(Solution solution, DocumentId? documentId, string filePath, CancellationToken cancellationToken);
EditAndContinue\IEditAndContinueSolutionProvider.cs (2)
10/// Retrieves the <see cref="Solution"/> snapshot that corresponds to the current state of the debuggee. 18event Action<Solution> SolutionCommitted;
EditAndContinue\PdbMatchingSourceTextProvider.cs (1)
102public void SetBaseline(Solution solution)
EditorConfigSettings\Aggregator\SettingsAggregator.cs (1)
83var solution = workspace.CurrentSolution;
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (1)
54var solution = Workspace.CurrentSolution;
EditorConfigSettings\Extensions\SolutionExtensions.cs (1)
14public static ImmutableArray<Project> GetProjectsUnderEditorConfigFile(this Solution solution, string pathToEditorConfigFile)
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (1)
74var solution = Workspace.CurrentSolution;
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (2)
116var finalSolution = await result.GetSolutionAsync(cancellationToken).ConfigureAwait(false); 118var solution = document.Project.Solution;
ExternalAccess\IntelliCode\IntentProcessor.cs (3)
106var newSolution = processorResult.Solution; 125Solution changedSolution, 126Solution currentSolution,
ExternalAccess\VSTypeScript\Api\AbstractVSTypeScriptRequestHandler.cs (1)
62internal record struct TypeScriptRequestContext(Solution? Solution, Document? Document);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptBreakpointResolutionServiceImplementation.cs (1)
16Task<IEnumerable<VSTypeScriptBreakpointResolutionResultWrapper>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptInlineRenameReplacementInfo.cs (1)
19public abstract Solution NewSolution { get; }
ExternalAccess\VSTypeScript\VSTypeScriptBreakpointResolutionService.cs (1)
32public async Task<IEnumerable<BreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default)
ExtractMethod\ExtractMethodCommandHandler.cs (1)
239var solution = project.Solution;
Formatting\FormatCommandHandler.Paste.cs (1)
70var solution = document.Project.Solution;
GoToDefinition\AbstractGoToDefinitionService.cs (2)
38var solution = document.Project.Solution; 98var solution = project.Solution;
GoToDefinition\GoToDefinitionHelpers.cs (4)
26Solution solution, 72Solution solution, ISymbol? symbol, CancellationToken cancellationToken) 111Solution solution, 125Solution solution,
Host\IPreviewDialogService.cs (3)
30Solution PreviewChanges( 36Solution newSolution, 37Solution oldSolution,
InlineRename\AbstractEditorInlineRenameService.InlineRenameReplacementInfo.cs (1)
26public Solution NewSolution => _conflicts.NewSolution!;
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (1)
140var solution = this.Document.Project.Solution;
InlineRename\IEditorInlineRenameService.cs (1)
111Solution NewSolution { get; }
InlineRename\InlineRenameSession.cs (7)
51private readonly Solution _baseSolution; 820var newSolution = info.NewSolution; 868Solution newSolution, CancellationToken cancellationToken) 875var finalSolution = CalculateFinalSolutionSynchronously(newSolution, newSolution.Workspace, changedDocumentIDs, cancellationToken); 920static Solution CalculateFinalSolutionSynchronously(Solution newSolution, Workspace workspace, List<DocumentId> changedDocumentIDs, CancellationToken cancellationToken) 922var finalSolution = workspace.CurrentSolution;
IntelliSense\Helpers.cs (1)
205var solution = workspace.CurrentSolution;
Interactive\InteractiveSession.cs (1)
257private Project CreateSubmissionProjectNoLock(Solution solution, ProjectId newSubmissionProjectId, ProjectId? previousSubmissionProjectId, string languageName, ImmutableArray<string> imports, ImmutableArray<MetadataReference> references)
Interactive\InteractiveWorkspace.cs (1)
83var emptySolution = CreateSolution(SolutionId.CreateNewId("InteractiveSolution"));
Preview\AbstractPreviewFactoryService.cs (4)
69public SolutionPreviewResult? GetSolutionPreviews(Solution oldSolution, Solution? newSolution, CancellationToken cancellationToken) 72public SolutionPreviewResult? GetSolutionPreviews(Solution oldSolution, Solution? newSolution, double zoomLevel, CancellationToken cancellationToken)
Preview\IPreviewFactoryService.cs (4)
11SolutionPreviewResult? GetSolutionPreviews(Solution oldSolution, Solution newSolution, CancellationToken cancellationToken); 12SolutionPreviewResult? GetSolutionPreviews(Solution oldSolution, Solution newSolution, double zoomLevel, CancellationToken cancellationToken);
Preview\SolutionChangeSummary.cs (4)
11public readonly Solution OldSolution; 12public readonly Solution NewSolution; 17public SolutionChangeSummary(Solution oldSolution, Solution newSolution, SolutionChanges changes)
ReferenceHighlighting\ReferenceHighlightingViewTaggerProvider.cs (1)
149var solution = document.Project.Solution;
Remote\SolutionChecksumUpdater.cs (1)
145var solution = _workspace.CurrentSolution;
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
121Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (8)
84var solutionWithOriginalName = await CreateSolutionWithOriginalNameAsync( 91var renamedSolution = await Renamer.RenameSymbolAsync(solutionWithOriginalName, symbol, options, newName, cancellationToken).ConfigureAwait(false); 152var finalSolution = workspace.CurrentSolution; 180private async Task<Solution> CreateSolutionWithOriginalNameAsync( 196var solution = document.Project.Solution; 205private async Task<ISymbol> TryGetSymbolAsync(Solution solutionWithOriginalName, DocumentId documentId, CancellationToken cancellationToken) 223private (NotificationSeverity, string)? TryUpdateWorkspaceForResetOfTypedIdentifier(Workspace workspace, Solution newSolution, int trackingSessionId) 256Solution newSolution,
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingSolutionSet.cs (4)
17public Solution OriginalSolution { get; } 18public Solution RenamedSolution { get; } 22Solution originalSolution, 23Solution renamedSolution)
Shared\Extensions\WorkspaceExtensions.cs (6)
22var oldSolution = workspace.CurrentSolution; 25var newSolution = oldSolution.UpdateDocument(newDocument.Id, changes, cancellationToken); 34var oldSolution = workspace.CurrentSolution; 35var newSolution = oldSolution.UpdateDocument(id, textChanges, cancellationToken); 39private static Solution UpdateDocument(this Solution solution, DocumentId id, IEnumerable<TextChange> textChanges, CancellationToken cancellationToken)
Shared\Preview\PreviewWorkspace.cs (1)
27public PreviewWorkspace(Solution solution)
TaskList\TaskListUpdatedArgs.cs (2)
16public Solution Solution { get; } 24object id, Solution solution, DocumentId documentId, ImmutableArray<TaskListItem> items)
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (28)
AbstractFixAllSuggestedAction.cs (1)
31Solution originalSolution,
CodeFixSuggestedAction.cs (1)
29Solution originalSolution,
CodeRefactoringSuggestedAction.cs (1)
27Solution originalSolution,
FixAllCodeFixSuggestedAction.cs (1)
28Solution originalSolution,
FixAllCodeRefactoringSuggestedAction.cs (1)
24Solution originalSolution,
FixAllGetFixesService.cs (7)
36public async Task<Solution> GetFixAllChangedSolutionAsync(IFixAllContext fixAllContext) 126var newSolution = await codeAction.GetChangedSolutionInternalAsync( 151internal static Solution PreviewChanges( 152Solution currentSolution, 153Solution newSolution, 202var changedSolution = previewService.PreviewChanges( 223private static ImmutableArray<CodeActionOperation> GetNewFixAllOperations(ImmutableArray<CodeActionOperation> operations, Solution newSolution, CancellationToken cancellationToken)
FixMultipleOccurrencesService.cs (4)
36public Solution GetFix( 55public Solution GetFix( 74private static Solution GetFixedSolution( 84Solution newSolution = null;
NavigationCommandHandlers\FindDerivedSymbolsCommandHandler.cs (1)
60private static async Task<IEnumerable<ISymbol>> GatherSymbolsAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken)
NavigationCommandHandlers\FindExtensionMethodsCommandHandler.cs (1)
69var solution = document.Project.Solution;
NavigationCommandHandlers\FindReferencesOfOverloadsCommandHandler.cs (1)
74private static async Task<ISymbol[]> GatherSymbolsAsync(ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, CancellationToken token)
PreviewChangesCodeAction.cs (2)
34Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken) 43var changedSolution = previewDialogService.PreviewChanges(
PreviewChangesSuggestedAction.cs (1)
26Solution originalSolution,
SuggestedAction.cs (2)
38protected readonly Solution OriginalSolution; 50Solution originalSolution,
SuggestedActionsSource.cs (1)
214var originalSolution = unifiedSuggestedActionSet.OriginalSolution;
SuggestedActionWithNestedActions.cs (2)
32Solution originalSolution, 47Solution originalSolution,
SuggestedActionWithNestedFlavors.cs (1)
42Solution originalSolution,
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (41)
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (19)
196var newSolution = workspace.CurrentSolution; 236var newSolution = workspace.CurrentSolution; 567internal async Task<Tuple<Solution, Solution>> TestActionAsync( 582protected static async Task<Tuple<Solution, Solution>> TestOperationsAsync( 593var oldSolution = appliedChanges.Item1; 594var newSolution = appliedChanges.Item2; 598var newSolutionWithLinkedFiles = await newSolution.WithMergedLinkedFileChangesAsync(oldSolution); 643protected static Document GetDocumentToVerify(DocumentId expectedChangedDocumentId, Solution oldSolution, Solution newSolution) 664private static async Task VerifyAgainstWorkspaceDefinitionAsync(string expectedText, Solution newSolution, TestComposition composition) 668var expectedSolution = expectedWorkspace.CurrentSolution; 763protected static async Task<Tuple<Solution, Solution>> ApplyOperationsAndGetSolutionAsync( 767Tuple<Solution, Solution> result = null; 776var oldSolution = workspace.CurrentSolution; 778var newSolution = workspace.CurrentSolution;
CodeActions\AbstractCodeActionOrUserDiagnosticTest_TestAddDocument.cs (8)
46protected async Task<Tuple<Solution, Solution>> TestAddDocumentAsync( 74private async Task<Tuple<Solution, Solution>> TestAddDocument( 92protected static async Task<Tuple<Solution, Solution>> TestAddDocument( 102var oldSolution = appliedChanges.Item1; 103var newSolution = appliedChanges.Item2;
CodeActions\SharedVerifierState.cs (3)
33private Func<Solution, ProjectId, Solution>? _remainingOptionsSolutionTransform; 45/// Gets a collection of options to apply to <see cref="Solution.Options"/> for testing. Values may be added
Diagnostics\AbstractUserDiagnosticTest_GenerateTypeDialog.cs (5)
108Tuple<Solution, Solution> oldSolutionAndNewSolution = null; 145var oldSolution = oldSolutionAndNewSolution.Item1; 146var newSolution = oldSolutionAndNewSolution.Item2; 156var newSolution = appliedChanges.Item2;
MoveType\AbstractMoveTypeTest.cs (6)
64var newSolution = oldSolutionAndNewSolution.Item2; 107var newSolution = oldSolutionAndNewSolution.Item2; 129private async Task<Tuple<Solution, Solution>> TestOperationAsync( 176var oldSolution = oldSolutionAndNewSolution.Item1; 177var newSolution = oldSolutionAndNewSolution.Item2;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (45)
Completion\AbstractCompletionProviderTests.cs (3)
808var solution = testWorkspace.CurrentSolution; 866var solution = testWorkspace.CurrentSolution; 897var solution = testWorkspace.CurrentSolution;
Diagnostics\MockDiagnosticAnalyzerService.cs (4)
55public Task ForceAnalyzeAsync(Solution solution, Action<Project> onProjectAnalyzed, ProjectId? projectId = null, CancellationToken cancellationToken = default) 61public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(Solution solution, ProjectId? projectId = null, DocumentId? documentId = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 64public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId = null, DocumentId? documentId = null, ImmutableHashSet<string>? diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 70public Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId = null, ImmutableHashSet<string>? diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default)
EditAndContinue\EditAndContinueTestHelpers.cs (1)
405var newSolution = oldProject.Solution;
EditAndContinue\MockActiveStatementSpanProvider.cs (2)
14public Func<Solution, ImmutableArray<DocumentId>, ImmutableArray<ImmutableArray<ActiveStatementSpan>>>? GetBaseActiveStatementSpansImpl; 17public ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken)
EditAndContinue\MockEditAndContinueWorkspaceService.cs (10)
22public Func<Solution, ImmutableArray<DocumentId>, ImmutableArray<ImmutableArray<ActiveStatementSpan>>>? GetBaseActiveStatementSpansImpl; 23public Func<Solution, ActiveStatementSpanProvider, ManagedInstructionId, LinePositionSpan?>? GetCurrentActiveStatementPositionImpl; 26public Func<Solution, IManagedHotReloadService, IPdbMatchingSourceTextProvider, ImmutableArray<DocumentId>, bool, bool, DebuggingSessionId>? StartDebuggingSessionImpl; 29public Func<Solution, ActiveStatementSpanProvider, EmitSolutionUpdateResults>? EmitSolutionUpdateImpl; 30public Func<Solution, ManagedInstructionId, bool?>? IsActiveStatementInExceptionRegionImpl; 58public ValueTask<EmitSolutionUpdateResults> EmitSolutionUpdateAsync(DebuggingSessionId sessionId, Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, CancellationToken cancellationToken) 67public ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(DebuggingSessionId sessionId, Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken) 70public ValueTask<LinePositionSpan?> GetCurrentActiveStatementPositionAsync(DebuggingSessionId sessionId, Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken) 79public ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(DebuggingSessionId sessionId, Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken) 85public ValueTask<DebuggingSessionId> StartDebuggingSessionAsync(Solution solution, IManagedHotReloadService debuggerService, IPdbMatchingSourceTextProvider sourceTextProvider, ImmutableArray<DocumentId> captureMatchingDocuments, bool captureAllMatchingDocuments, bool reportDiagnostics, CancellationToken cancellationToken)
ExtractInterface\AbstractExtractInterfaceTests.cs (1)
161var updatedSolution = await testState.ExtractViaCodeAction();
ExtractInterface\ExtractInterfaceTestState.cs (2)
35public Solution OriginalSolution { get; } 103public async Task<Solution> ExtractViaCodeAction()
Formatting\AbstractNewDocumentFormattingServiceTests.cs (1)
30var solution = workspace.CurrentSolution;
LanguageServer\AbstractLanguageServerProtocolTests.cs (4)
320var solution = workspace.CurrentSolution; 412var newSolution = workspace.CurrentSolution.AddDocument(generatedDocumentInfo); 416public static async Task<Dictionary<string, IList<LSP.Location>>> GetAnnotatedLocationsAsync(TestWorkspace workspace, Solution solution) 667public Solution GetCurrentSolution() => TestWorkspace.CurrentSolution;
Rename\RenamerTests.cs (3)
41var solution = workspace.CurrentSolution; 176var solution = workspace.CurrentSolution; 215var solution = workspace.CurrentSolution;
RenameTracking\MockPreviewDialogService.cs (3)
33public Solution PreviewChanges(string title, string helpString, string description, string topLevelName, Glyph topLevelGlyph, Solution newSolution, Solution oldSolution, bool showCheckBoxes = true)
Workspaces\TestSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs (6)
24public CodeActionOperation CreateSymbolRenamedOperation(ISymbol symbol, string newName, Solution startingSolution, Solution updatedSolution) 31public Solution _startingSolution; 32public Solution _updatedSolution; 34public Operation(ISymbol symbol, string newName, Solution startingSolution, Solution updatedSolution)
Workspaces\TestWorkspace.cs (5)
764public Task ChangeDocumentAsync(DocumentId documentId, Solution solution) 794public void ChangeProject(ProjectId projectId, Solution solution) 799public Task ChangeProjectAsync(ProjectId projectId, Solution solution) 809public void ChangeSolution(Solution solution) 814public Task ChangeSolutionAsync(Solution solution)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (145)
CodeFixes\CodeFixServiceTests.cs (1)
824var solution = await codeAction.GetChangedSolutionInternalAsync(txtDocument.Project.Solution);
CodeGeneration\CodeGenerationTests.cs (1)
895public Solution Solution { get { return Workspace.CurrentSolution; } }
CodeRefactorings\CodeRefactoringServiceTest.cs (2)
189var solution = await codeAction.GetChangedSolutionInternalAsync(project.Solution); 228var solution = await codeAction.GetChangedSolutionInternalAsync(project.Solution);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
466var solution = workspace.CurrentSolution; 570var solution = workspace.CurrentSolution;
EditAndContinue\ActiveStatementsMapTests.cs (3)
90var solution = workspace.CurrentSolution 145var solution = workspace.CurrentSolution 196var solution = workspace.CurrentSolution
EditAndContinue\CompileTimeSolutionProviderTests.cs (4)
47var designTimeSolution = workspace.CurrentSolution. 64var compileTimeSolution = provider.GetCompileTimeSolution(designTimeSolution); 131var compileTimeSolution1 = provider.GetCompileTimeSolution(workspace.CurrentSolution); 146var compileTimeSolution2 = provider.GetCompileTimeSolution(workspace.CurrentSolution);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (75)
75private TestWorkspace CreateWorkspace(out Solution solution, out EditAndContinueWorkspaceService service, Type[] additionalParts = null) 83private TestWorkspace CreateEditorWorkspace(out Solution solution, out EditAndContinueWorkspaceService service, out EditAndContinueLanguageService languageService, Type[] additionalParts = null) 104private static (Solution, Document) AddDefaultTestProject( 105Solution solution, 115private static Solution AddDefaultTestProject( 116Solution solution, 174Solution solution, 240Solution solution, 247internal static void SetDocumentsState(DebuggingSession session, Solution solution, CommittedSolution.DocumentState state) 525using var _ = CreateWorkspace(out var solution, out var service, new[] { typeof(NoCompilationLanguageService) }); 612using var _ = CreateWorkspace(out var solution, out var service); 645using var _ = CreateWorkspace(out var solution, out var service); 680using var _ = CreateWorkspace(out var solution, out var service, new[] { typeof(NoCompilationLanguageService) }); 715using var _ = CreateWorkspace(out var solution, out var service); 748using var _ = CreateWorkspace(out var solution, out var service); 800using var _ = CreateWorkspace(out var solution, out var service); 908using var _w = CreateWorkspace(out var solution, out var service); 977using var _ = CreateWorkspace(out var solution, out var service); 1030using var _ = CreateWorkspace(out var solution, out var service); 1089using var _ = CreateWorkspace(out var solution, out var service); 1175using var _ = CreateWorkspace(out var solution, out var service); 1227using var _ = CreateWorkspace(out var solution, out var service); 1277using var _ = CreateWorkspace(out var solution, out var service); 1337using var workspace = CreateWorkspace(out var solution, out var service); 1386using var _ = CreateWorkspace(out var solution, out var service); 1453using var _ = CreateWorkspace(out var solution, out var service); 1529using var _ = CreateWorkspace(out var solution, out var service); 1564using var _ = CreateWorkspace(out var solution, out var service); 1671using var _ = CreateWorkspace(out var solution, out var service); 1715using var _ = CreateWorkspace(out var solution, out var service); 1770using var _ = CreateWorkspace(out var solution, out var service); 1810using var _ = CreateWorkspace(out var solution, out var service); 1854using var _ = CreateWorkspace(out var solution, out var service); 1878var oldSolution = solution; 1919using var _ = CreateWorkspace(out var solution, out var service); 1969var oldSolution = solution; 2087using var _ = CreateWorkspace(out var solution, out var service); 2171using var _ = CreateWorkspace(out var solution, out var service); 2284using var _ = CreateWorkspace(out var solution, out var service); 2317using var _ = CreateWorkspace(out var solution, out var service); 2354using var _ = CreateWorkspace(out var solution, out var service); 2425using var _ = CreateWorkspace(out var solution, out var service); 2513using var _ = CreateWorkspace(out var solution, out var service); 2581using var _ = CreateWorkspace(out var solution, out var service); 2643using var _ = CreateWorkspace(out var solution, out var service); 2695using var _ = CreateWorkspace(out var solution, out var service); 2831using var _ = CreateWorkspace(out var solution, out var service); 2951using var _ = CreateWorkspace(out var solution, out var service); 3001using var _ = CreateWorkspace(out var solution, out var service); 3061using var _ = CreateWorkspace(out var solution, out var service); 3109using var _ = CreateWorkspace(out var solution, out var service); 3156using var _ = CreateWorkspace(out var solution, out var service); 3200using var _ = CreateWorkspace(out var solution, out var service); 3242using var _ = CreateWorkspace(out var solution, out var service); 3279using var _ = CreateWorkspace(out var solution, out var service); 3338using var _ = CreateWorkspace(out var solution, out var service); 3469using var _ = CreateWorkspace(out var solution, out var service); 3501using var _ = CreateWorkspace(out var solution, out var service); 3539using var _ = CreateWorkspace(out var solution, out var service); 3636using var _ = CreateWorkspace(out var solution, out var service); 3709using var _ = CreateWorkspace(out var solution, out var service, new[] { typeof(NoCompilationLanguageService) }); 3778using var _ = CreateWorkspace(out var solution, out var service); 3895using var _ = CreateWorkspace(out var solution, out var service); 3980using var _ = CreateWorkspace(out var solution, out var service); 4065using var _ = CreateWorkspace(out var solution, out var service); 4151using var _ = CreateWorkspace(out var solution, out var service); 4295using var _ = CreateWorkspace(out var solution, out var service); 4404using var _ = CreateWorkspace(out var solution, out var service); 4468using var _ = CreateWorkspace(out var solution, out var encService); 4494var solution1 = solution.WithDocumentText(documentIdA, CreateText("class C { void M() { System.Console.WriteLine(" + i + "); } }")); 4501var solution2 = solution1.WithDocumentText(documentIdA, CreateText(source3)); 4518using var _1 = CreateWorkspace(out var solution, out var service); 4554using var workspace = CreateWorkspace(out var solution, out var encService); 4622using var workspace = CreateWorkspace(out var solution, out var encService); 4686using var workspace = CreateEditorWorkspace(out var solution, out var service, out var languageService);
EditAndContinue\EditSessionActiveStatementsTests.cs (7)
38Solution solution, 68private static Solution AddDefaultTestSolution(TestWorkspace workspace, string[] markedSources) 70var solution = workspace.CurrentSolution; 177var solution = AddDefaultTestSolution(workspace, markedSources); 339var solution = AddDefaultTestSolution(workspace, new[] { baseSource }); 521var solution = AddDefaultTestSolution(workspace, new[] { markedSourceV2 }); 656var solution = AddDefaultTestSolution(workspace, markedSources);
EditAndContinue\EmitSolutionUpdateResultsTests.cs (1)
36var solution = document.Project.Solution;
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
90var solution = localWorkspace.CurrentSolution;
FindSymbols\SymbolTreeInfoTests.cs (4)
25var solution = workspace.CurrentSolution; 46var solution = workspace.CurrentSolution; 69var solution = workspace.CurrentSolution; 91var solution = workspace.CurrentSolution;
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (3)
56var solution = workspace.CurrentSolution; 64var newSolution = solution 85var newSolution = document.Project.Solution
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
64public Solution CurrentSolution
Preview\PreviewWorkspaceTests.cs (7)
63var solution = previewWorkspace.CurrentSolution; 67var newSolution = previewWorkspace.CurrentSolution.RemoveProject(project.Id); 77var solution = previewWorkspace.CurrentSolution; 81var addedSolution = previewWorkspace.CurrentSolution.Projects.First() 89var changedSolution = previewWorkspace.CurrentSolution.Projects.First().Documents.First().WithText(SourceText.From(text)).Project.Solution; 93var removedSolution = previewWorkspace.CurrentSolution.Projects.First() 107var solution = previewWorkspace.CurrentSolution;
SolutionCrawler\WorkCoordinatorTests.cs (10)
194var solution = workspace.CurrentSolution; 198var changedSolution = solution.AddProject("P3", "P3", LanguageNames.CSharp).AddDocument("D1", "").Project.Solution; 266var solution = workspace.CurrentSolution.RemoveDocument(documentId); 378var newSolution = workspace.CurrentSolution.WithProjectOutputFilePath(project.Id, "/newPath"); 406var newSolution = workspace.CurrentSolution.WithProjectOutputRefFilePath(project.Id, "/newPath"); 434var newSolution = workspace.CurrentSolution.WithProjectCompilationOutputInfo(project.Id, new CompilationOutputInfo(assemblyPath: "/newPath")); 464var newSolution = workspace.CurrentSolution.WithRunAnalyzers(project.Id, false); 1584private static async Task TouchEverything(Solution solution) 1969public Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken) 1998public Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken) => Task.CompletedTask;
SymbolFinder\DependentTypeFinderTests.cs (22)
27private static Solution AddProjectWithMetadataReferences(Solution solution, string projectName, string languageName, string code, MetadataReference metadataReference, params ProjectId[] projectReferences) 53var solution = workspace.CurrentSolution; 94var solution = workspace.CurrentSolution; 131private static Project GetPortableProject(Solution solution) 134private static Project GetNormalProject(Solution solution) 141var solution = workspace.CurrentSolution; 186var solution = workspace.CurrentSolution; 227var solution = workspace.CurrentSolution; 269var solution = workspace.CurrentSolution; 311var solution = workspace.CurrentSolution; 351var solution = workspace.CurrentSolution; 392var solution = workspace.CurrentSolution; 432var solution = workspace.CurrentSolution; 463var solution = workspace.CurrentSolution; 512var solution = workspace.CurrentSolution; 564var solution = workspace.CurrentSolution; 591var solution = workspace.CurrentSolution; 638var solution = workspace.CurrentSolution; 664var solution = workspace.CurrentSolution; 728var solution = workspace.CurrentSolution; 771var solution = workspace.CurrentSolution;
SymbolKey\SymbolKeyCrossLanguageTests.cs (1)
41var solution = workspace.CurrentSolution;
Microsoft.CodeAnalysis.EditorFeatures.Wpf (27)
Peek\DefinitionPeekableItem.cs (1)
71var solution = workspace.CurrentSolution;
Peek\PeekableItemFactory.cs (1)
62var solution = project.Solution;
Suggestions\FixAll\FixAllGetFixesService.cs (7)
36public async Task<Solution> GetFixAllChangedSolutionAsync(IFixAllContext fixAllContext) 126var newSolution = await codeAction.GetChangedSolutionInternalAsync( 151internal static Solution PreviewChanges( 152Solution currentSolution, 153Solution newSolution, 202var changedSolution = previewService.PreviewChanges( 223private static ImmutableArray<CodeActionOperation> GetNewFixAllOperations(ImmutableArray<CodeActionOperation> operations, Solution newSolution, CancellationToken cancellationToken)
Suggestions\FixAll\FixMultipleOccurrencesService.cs (4)
36public Solution GetFix( 55public Solution GetFix( 74private static Solution GetFixedSolution( 84Solution newSolution = null;
Suggestions\PreviewChanges\PreviewChangesCodeAction.cs (2)
34Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken) 43var changedSolution = previewDialogService.PreviewChanges(
Suggestions\PreviewChanges\PreviewChangesSuggestedAction.cs (1)
26Solution originalSolution,
Suggestions\SuggestedActions\AbstractFixAllSuggestedAction.cs (1)
31Solution originalSolution,
Suggestions\SuggestedActions\CodeFixSuggestedAction.cs (1)
29Solution originalSolution,
Suggestions\SuggestedActions\CodeRefactoringSuggestedAction.cs (1)
27Solution originalSolution,
Suggestions\SuggestedActions\FixAllCodeFixSuggestedAction.cs (1)
28Solution originalSolution,
Suggestions\SuggestedActions\FixAllCodeRefactoringSuggestedAction.cs (1)
24Solution originalSolution,
Suggestions\SuggestedActions\SuggestedAction.cs (2)
38protected readonly Solution OriginalSolution; 50Solution originalSolution,
Suggestions\SuggestedActionsSource.cs (1)
214var originalSolution = unifiedSuggestedActionSet.OriginalSolution;
Suggestions\SuggestedActionWithNestedActions.cs (2)
32Solution originalSolution, 47Solution originalSolution,
Suggestions\SuggestedActionWithNestedFlavors.cs (1)
42Solution originalSolution,
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (11)
Compilation\CompilationTests.vb (1)
12Private Shared Function GetProject(snapshot As Solution, assemblyName As String) As Project
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
62Optional verifySolutions As Func(Of Solution, Solution, Task) = Nothing,
Diagnostics\AddImport\AddImportCrossLanguageTests.vb (4)
573Dim verifySolutions As Func(Of Solution, Solution, Task) = Nothing 578Function(oldSolution As Solution, newSolution As Solution)
FindReferences\FindReferencesTests.vb (2)
506Private Shared Function GetFilePathAndProjectLabel(solution As Solution, syntaxTree As SyntaxTree) As String 571Private Shared Async Function LinkedFileTestHelper(solution As Solution, expectedLinkedSymbolCount As Integer) As Task
Rename\RenameEngineResult.vb (1)
122solution As Solution,
Workspaces\TryFindSourceDefinitionTests.vb (1)
17Private Shared Function GetProject(snapshot As Solution, assemblyName As String) As Project
Microsoft.CodeAnalysis.ExternalAccess.Debugger (2)
GlassTestsHotReloadService.cs (2)
31public async Task StartSessionAsync(Solution solution, CancellationToken cancellationToken) 85public async ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(Solution solution, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (5)
Editor\IFSharpEditorInlineRenameService.cs (1)
23Solution NewSolution { get; }
Editor\Implementation\Debugging\IFSharpBreakpointResolutionService.cs (1)
16Task<IEnumerable<FSharpBreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default);
Editor\InlineRename\FSharpInlineRenameReplacementInfo.cs (1)
20public abstract Solution NewSolution { get; }
Internal\Editor\FSharpEditorInlineRenameService.cs (1)
73public Solution NewSolution => _info.NewSolution;
Internal\Editor\Implementation\Debugging\FSharpBreakpointResolutionService.cs (1)
34public async Task<IEnumerable<BreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (8)
Analyzers\OmniSharpWorkspaceAnalyzerOptionsFactory.cs (1)
11public static AnalyzerOptions Create(Solution solution, AnalyzerOptions options)
CodeRefactorings\WorkspaceServices\IOmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs (2)
11CodeActionOperation CreateSymbolRenamedOperation(ISymbol symbol, string newName, Solution startingSolution, Solution updatedSolution);
Internal\CodeRefactorings\WorkspaceServices\OmniSharpSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs (2)
27public CodeActionOperation CreateSymbolRenamedOperation(ISymbol symbol, string newName, Solution startingSolution, Solution updatedSolution)
NavigateTo\OmniSharpNavigateToSearchService.cs (1)
22Solution solution,
Rename\OmniSharpRenamer.cs (2)
18public readonly record struct RenameResult(Solution? Solution, string? ErrorMessage); 21Solution solution,
Microsoft.CodeAnalysis.ExternalAccess.Razor (8)
Remote\RazorRemoteHostClient.cs (4)
68public async ValueTask<bool> TryInvokeAsync<TService>(Solution solution, Func<TService, RazorPinnedSolutionInfoWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) where TService : class 74public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Solution solution, Func<TService, RazorPinnedSolutionInfoWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) where TService : class 82public async ValueTask<bool> TryInvokeAsync<TService>(Solution solution, Func<TService, RazorPinnedSolutionInfoWrapper, RazorRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask> invocation, object callbackTarget, CancellationToken cancellationToken) where TService : class 88public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Solution solution, Func<TService, RazorPinnedSolutionInfoWrapper, RazorRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask<TResult>> invocation, object callbackTarget, CancellationToken cancellationToken) where TService : class
Remote\RazorRemoteServiceConnectionWrapper.cs (4)
45public ValueTask<bool> TryInvokeAsync(Solution solution, Func<TService, RazorPinnedSolutionInfoWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 51public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Solution solution, Func<TService, RazorPinnedSolutionInfoWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) 59public ValueTask<bool> TryInvokeAsync(Solution solution, Func<TService, RazorPinnedSolutionInfoWrapper, RazorRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 65public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Solution solution, Func<TService, RazorPinnedSolutionInfoWrapper, RazorRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (601)
AbstractAddParameterCodeFixProvider.cs (2)
334? new Func<CancellationToken, Task<Solution>>(c => FixAsync(document, methodToUpdate, argumentToInsert, arguments, fixAllReferences: true, c)) 364private async Task<Solution> FixAsync(
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (2)
43private static async Task<Solution> FixAllInDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CodeActionOptionsProvider options, CancellationToken cancellationToken) 67var newSolution = await renameActionSet.UpdateSolutionAsync(documentWithInvalidFolders.Project.Solution, cancellationToken).ConfigureAwait(false);
AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (3)
72private static async Task<Solution> FixAllByDocumentAsync( 73Solution solution, 90var newSolution = solution;
AbstractMakeMethodAsynchronousCodeFixProvider.cs (5)
102private async Task<Solution> FixNodeAsync( 154private async Task<Solution> RenameThenAddAsyncTokenAsync( 164var solution = document.Project.Solution; 170var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 184private async Task<Solution> AddAsyncTokenAsync(
AbstractMakeMethodSynchronousCodeFixProvider.cs (12)
51private async Task<Solution> FixNodeAsync( 73private async Task<Solution> RenameThenRemoveAsyncTokenAsync(Document document, SyntaxNode node, IMethodSymbol methodSymbol, CancellationToken cancellationToken) 77var solution = document.Project.Solution; 83var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 96private async Task<Solution> RemoveAsyncTokenAsync( 110var newSolution = newDocument.Project.Solution; 119private static async Task<Solution> RemoveAwaitFromCallersAsync( 154private static async Task<Solution> RemoveAwaitFromCallersAsync( 155Solution solution, ImmutableArray<ReferenceLocation> locations, CancellationToken cancellationToken) 157var currentSolution = solution; 170private static async Task<Solution> RemoveAwaitFromCallersAsync( 171Solution currentSolution, IGrouping<Document, ReferenceLocation> group, CancellationToken cancellationToken)
AbstractUnsealClassCodeFixProvider.cs (2)
57private static async Task<Solution> UnsealDeclarationsAsync( 58Solution solution, ImmutableArray<SyntaxReference> declarationReferences, CancellationToken cancellationToken)
AbstractUpgradeProjectCodeFixProvider.cs (7)
22public abstract Solution UpgradeProject(Project project, string version); 44var solution = project.Solution; 76public Solution UpgradeAllProjects(Solution solution, string language, string version, CancellationToken cancellationToken) 78var currentSolution = solution; 125private ProjectOptionsChangeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) 130public static ProjectOptionsChangeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (2)
53protected override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 74return Task.FromResult<Solution?>(constructorDocument.WithSyntaxRoot(newRoot).Project.Solution);
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (1)
183var changedSolution = await action.GetChangedSolutionInternalAsync(
AddImport\AbstractAddImportFeatureService.cs (2)
295var solution = project.Solution; 427var solution = project.Solution;
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (1)
87Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (4)
66private async Task<Solution> GetUpdatedSolutionAsync(CancellationToken cancellationToken) 122Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken) 124var newSolution = workspace.CurrentSolution.WithDocumentText( 136var rolledBackSolution = workspace.CurrentSolution.WithDocumentText(
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (1)
80Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
AddPackage\InstallPackageDirectlyCodeActionOperation.cs (1)
73Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
AddParameterService.cs (2)
73public static async Task<Solution> AddParameterAsync( 83var solution = invocationDocument.Project.Solution;
ChangeSignature\AbstractChangeSignatureService.cs (5)
161var solution = document.Project.Solution; 226Solution solution, 247private async Task<(Solution updatedSolution, string? confirmationMessage)> CreateUpdatedSolutionAsync( 252var currentSolution = context.Solution; 449private static bool TryGetNodeWithEditableSignatureOrAttributes(Location location, Solution solution, out SyntaxNode nodeToUpdate, out DocumentId documentId)
ChangeSignature\ChangeSignatureAnalyzedContext.cs (1)
31public Solution Solution => Document.Project.Solution;
ChangeSignature\ChangeSignatureCodeActionOperation.cs (4)
22public Solution ChangedSolution { get; } 26public ChangeSignatureCodeActionOperation(Solution changedSolution, string? confirmationMessage) 38Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken) 43private bool ApplyWorker(Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
ChangeSignature\ChangeSignatureResult.cs (2)
13public Solution? UpdatedSolution { get; } 26Solution? updatedSolution = null,
ChangeSignature\DelegateInvokeMethodReferenceFinder.cs (1)
37Solution solution,
CodeFixData.cs (4)
15Func<CancellationToken, Task<Solution>> createChangedSolutionNonCascading, 16Func<CancellationToken, Task<Solution>>? createChangedSolutionCascading) 31public Func<CancellationToken, Task<Solution>> CreateChangedSolutionNonCascading { get; } 36public Func<CancellationToken, Task<Solution>>? CreateChangedSolutionCascading { get; }
CodeFixes\Configuration\ConfigurationUpdater.cs (13)
111public static Task<Solution> ConfigureSeverityAsync( 130public static Task<Solution> ConfigureSeverityAsync( 161public static Task<Solution> BulkConfigureSeverityAsync( 176public static Task<Solution> BulkConfigureSeverityAsync( 184private static Task<Solution> BulkConfigureSeverityCoreAsync( 201public static Task<Solution> ConfigureCodeStyleOptionAsync( 213private static async Task<Solution> ConfigureCodeStyleOptionsAsync( 246var solution = await updater.ConfigureAsync().ConfigureAwait(false); 258var solution = await updater.ConfigureAsync().ConfigureAwait(false); 265private async Task<Solution> ConfigureAsync() 274var solution = editorConfigDocument.Project.Solution; 314var currentSolution = _project.Solution; 346var newSolution = project.Solution.AddAnalyzerConfigDocuments(ImmutableArray.Create(documentInfo));
CodeFixes\FixAllOccurrences\IFixMultipleOccurrencesService.cs (2)
20Solution GetFix( 35Solution GetFix(
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (10)
240var solution = fixAllState.Solution; 241var newSolution = await TryMergeFixesAsync( 255public virtual async Task<Solution> TryMergeFixesAsync( 256Solution oldSolution, 273var currentSolution = oldSolution; 281Solution oldSolution, 303Solution oldSolution, 328Solution oldSolution, 376Solution oldSolution, 383var changedSolution = await codeAction.GetChangedSolutionInternalAsync(
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (5)
61public GlobalSuppressionSolutionChangeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string equivalenceKey) 73private static async Task<Solution> CreateChangedSolutionAsync( 80var currentSolution = triggerDocument.Project.Solution; 103private static async Task<Solution> CreateChangedSolutionAsync( 110var currentSolution = triggerProject.Solution;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (2)
116var oldSolution = fixAllState.Project.Solution; 117var currentSolution = oldSolution;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Attribute.cs (1)
59protected override async Task<Solution> GetChangedSolutionAsync(CancellationToken cancellationToken)
CodeFixesAndRefactorings\AbstractFixAllCodeAction.cs (1)
73internal sealed override Task<Solution?> GetChangedSolutionAsync(
CodeFixesAndRefactorings\IFixAllGetFixesService.cs (1)
24Task<Solution?> GetFixAllChangedSolutionAsync(IFixAllContext fixAllContext);
CodeLens\CodeLensReferencesService.cs (8)
43private static async Task<T?> FindAsync<T>(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, 85public async ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken) 90public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, int maxSearchResults, CancellationToken cancellationToken) 102private static async Task<ReferenceLocationDescriptor> GetDescriptorOfEnclosingSymbolAsync(Solution solution, Location location, CancellationToken cancellationToken) 203public async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken) 246private static async Task<ReferenceMethodDescriptor> TryGetMethodDescriptorAsync(Location commonLocation, Solution solution, CancellationToken cancellationToken) 260public Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken) 276public async Task<string> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode,
CodeLens\ICodeLensReferencesService.cs (5)
14ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken); 23Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, int maxSearchResults, CancellationToken cancellationToken); 28Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken); 33Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken); 38Task<string?> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken);
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (3)
57var solution = document.Project.Solution; 92var solution = document.Project.Solution; 217Solution newSolution;
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsRefactoringProvider.cs (1)
61private static async Task<Solution> AddMissingImportsAsync(Document document, IAddMissingImportsFeatureService addMissingImportsService, AddMissingImportsAnalysisResult analysis, SyntaxFormattingOptions formattingOptions, CancellationToken cancellationToken)
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (1)
43var solution = document.Project.Solution;
CodeRefactorings\MoveType\AbstractMoveTypeService.cs (3)
33public abstract Task<Solution> GetModifiedSolutionAsync(Document document, TextSpan textSpan, MoveTypeOperationKind operationKind, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken); 59public override async Task<Solution> GetModifiedSolutionAsync(Document document, TextSpan textSpan, MoveTypeOperationKind operationKind, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken) 77var modifiedSolution = await editor.GetModifiedSolutionAsync().ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.Editor.cs (2)
46var solution = await GetModifiedSolutionAsync().ConfigureAwait(false); 59public abstract Task<Solution> GetModifiedSolutionAsync();
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (7)
48public override async Task<Solution> GetModifiedSolutionAsync() 67var solutionWithNewDocument = documentWithMovedType.Project.Solution; 74var solutionWithBothDocumentsUpdated = await RemoveTypeFromSourceDocumentAsync(sourceDocument).ConfigureAwait(false); 79private async Task<Solution> RemoveUnnecessaryImportsAsync( 80Solution solution, DocumentId sourceDocumentId, DocumentId documentWithMovedTypeId) 147var solutionWithNewDocument = projectToBeUpdated.Solution.AddDocument( 192private async Task<Solution> RemoveTypeFromSourceDocumentAsync(Document sourceDocument)
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (2)
31public override async Task<Solution> GetModifiedSolutionAsync() 44private static async Task<Solution> GetNamespaceScopeChangedSolutionAsync(
CodeRefactorings\MoveType\AbstractMoveTypeService.RenameFileEditor.cs (4)
26public override Task<Solution> GetModifiedSolutionAsync() 28var modifiedSolution = SemanticDocument.Project.Solution 40var oldSolution = SemanticDocument.Document.Project.Solution; 41var newSolution = oldSolution.WithDocumentName(documentId, FileName);
CodeRefactorings\MoveType\AbstractMoveTypeService.RenameTypeEditor.cs (2)
25public override async Task<Solution> GetModifiedSolutionAsync() 30var solution = SemanticDocument.Document.Project.Solution;
CodeRefactorings\MoveType\IMoveTypeService.cs (1)
22Task<Solution> GetModifiedSolutionAsync(Document document, TextSpan textSpan, MoveTypeOperationKind operationKind, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (25)
38public abstract Task<Solution> ChangeNamespaceAsync(Document document, SyntaxNode container, string targetNamespace, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken); 40public abstract Task<Solution?> TryChangeTopLevelNamespacesAsync(Document document, string targetNamespace, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken); 111public override async Task<Solution?> TryChangeTopLevelNamespacesAsync( 132var solution = document.Project.Solution; 173public override async Task<Solution> ChangeNamespaceAsync( 193var solution = document.Project.Solution; 209var annotatedSolution = await AnnotateContainersAsync(solution, containersFromAllDocuments, cancellationToken).ConfigureAwait(false); 220var solutionAfterNamespaceChange = annotatedSolution; 232var solutionAfterFirstMerge = await MergeDiffAsync(solution, solutionAfterNamespaceChange, cancellationToken).ConfigureAwait(false); 251var solutionAfterImportsRemoved = await RemoveUnnecessaryImportsAsync( 269Solution solution, 311protected static async Task<Solution> AnnotateContainersAsync(Solution solution, ImmutableArray<(DocumentId, SyntaxNode)> containers, CancellationToken cancellationToken) 348var solution = document.Project.Solution; 427private async Task<(Solution, ImmutableArray<DocumentId>)> ChangeNamespaceInSingleDocumentAsync( 428Solution solution, 471var solutionWithChangedNamespace = documentWithNewNamespace.Project.Solution; 484var solutionWithFixedReferences = await MergeDocumentChangesAsync(solutionWithChangedNamespace, fixedDocuments, cancellationToken).ConfigureAwait(false); 489private static async Task<Solution> MergeDocumentChangesAsync(Solution originalSolution, Document[] changedDocuments, CancellationToken cancellationToken) 760private static async Task<Solution> RemoveUnnecessaryImportsAsync( 761Solution solution, 855private static async Task<Solution> MergeDiffAsync(Solution oldSolution, Solution newSolution, CancellationToken cancellationToken)
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
45var solution = _state.Document.Project.Solution;
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (1)
171var solution = document.Project.Solution;
CodeRefactorings\WorkspaceServices\ISymbolRenamedCodeActionOperationFactoryWorkspaceService.cs (2)
13CodeActionOperation CreateSymbolRenamedOperation(ISymbol symbol, string newName, Solution startingSolution, Solution updatedSolution);
Completion\CompletionOptions.cs (1)
69var solution = document.Project.Solution;
Completion\CompletionService.cs (1)
122/// <param name="passThroughOptions">Options originating either from external caller of the <see cref="CompletionService"/> or set externally to <see cref="Solution.Options"/>.</param>
Completion\Providers\AbstractPreprocessorCompletionProvider.cs (1)
23var solution = originatingDocument.Project.Solution;
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
312var solution = document.Project.Solution;
Completion\Providers\CompletionUtilities.cs (1)
33Solution? solution = null;
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (1)
218var solution = document.Project.Solution;
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (2)
76var solution = currentProject.Solution; 184Solution solution,
Completion\Providers\SymbolCompletionItem.cs (1)
229public static SupportedPlatformData? GetSupportedPlatforms(CompletionItem item, Solution solution)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (11)
207public async Task<Solution> ConvertToStructAsync( 214var solution = document.Project.Solution; 229var resultSolution = await RemoteUtilities.UpdateSolutionAsync( 241private static async Task<Solution> AddRenameTokenAsync( 242Solution solution, 254private async Task<Solution> ConvertToStructInCurrentProcessAsync( 310var updatedSolution = await ApplyChangesAsync( 430var solution = startingProject.Solution; 516var solution = startingDocument.Project.Solution; 575private static async Task<Solution> ApplyChangesAsync( 578var currentSolution = startingDocument.Project.Solution;
ConvertTupleToStruct\IConvertTupleToStructCodeRefactoringProvider.cs (1)
17Task<Solution> ConvertToStructAsync(
Debugging\AbstractBreakpointResolver.cs (2)
60private readonly Solution _solution; 64Solution solution,
Debugging\IBreakpointResolutionService.cs (1)
17Task<IEnumerable<BreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default);
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
65Solution solution,
DesignerAttribute\IDesignerAttributeDiscoveryService.cs (1)
20Solution solution, DocumentId? priorityDocumentId, bool useFrozenSnapshots, ICallback callback, CancellationToken cancellationToken);
Diagnostics\AbstractHostDiagnosticUpdateSource.cs (1)
40var solution = Workspace.CurrentSolution;
Diagnostics\BuildOnlyDiagnosticsService.cs (2)
64public void AddBuildOnlyDiagnostics(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableArray<DiagnosticData> diagnostics) 112public void ClearBuildOnlyDiagnostics(Solution solution, ProjectId? projectId, DocumentId? documentId)
Diagnostics\DiagnosticsUpdatedArgs.cs (4)
15public Solution? Solution { get; } 22Solution? solution, 42Solution? solution, 53Solution? solution,
Diagnostics\IBuildOnlyDiagnosticsService.cs (2)
16void AddBuildOnlyDiagnostics(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableArray<DiagnosticData> diagnostics); 18void ClearBuildOnlyDiagnostics(Solution solution, ProjectId? projectId, DocumentId? documentId);
Diagnostics\IDiagnosticAnalyzerService.cs (6)
43Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(Solution solution, ProjectId? projectId = null, DocumentId? documentId = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default); 48Task ForceAnalyzeAsync(Solution solution, Action<Project> onProjectAnalyzed, ProjectId? projectId = null, CancellationToken cancellationToken = default); 57/// Note that for project case, this method returns diagnostics from all project documents as well. Use <see cref="GetProjectDiagnosticsForIdsAsync(Solution, ProjectId, ImmutableHashSet{string}, bool, CancellationToken)"/> 60Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId = null, DocumentId? documentId = null, ImmutableHashSet<string>? diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default); 64/// Note that this method doesn't return any document diagnostics. Use <see cref="GetDiagnosticsForIdsAsync(Solution, ProjectId, DocumentId, ImmutableHashSet{string}, bool, CancellationToken)"/> to also fetch those. 66Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId = null, ImmutableHashSet<string>? diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (6)
39var solution = document.Project.Solution; 71var solution = document.Project.Solution; 164var solution = startingDocument.Project.Solution; 200Solution solution, 293private static async Task AddLocationSpanAsync(Location location, Solution solution, HashSet<DocumentSpan> spanSet, MultiDictionary<Document, HighlightSpan> tagList, HighlightSpanKind kind, CancellationToken cancellationToken) 304Solution solution, Location location, CancellationToken cancellationToken)
DocumentHighlighting\IRemoteDocumentHighlightsService.cs (1)
34public async ValueTask<DocumentHighlights> RehydrateAsync(Solution solution)
DocumentIdSpan.cs (2)
15/// very stale <see cref="Solution"/> snapshot that may keep around a lot of memory in a host. 34public async Task<DocumentSpan?> TryRehydrateAsync(Solution solution, CancellationToken cancellationToken)
DocumentSpanExtensions.cs (1)
16var solution = documentSpan.Document.Project.Solution;
EditAndContinue\CommittedSolution.cs (5)
31private Solution _solution; 94public CommittedSolution(DebuggingSession debuggingSession, Solution solution, IEnumerable<KeyValuePair<DocumentId, DocumentState>> initialDocumentStates) 119public bool HasNoChanges(Solution solution) 145Solution solution; 429public void CommitSolution(Solution solution)
EditAndContinue\DebuggingSession.cs (8)
107Solution solution, 164private void StorePendingUpdate(Solution solution, SolutionUpdate update) 524Solution solution, 623public async ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken) 785var newSolution = newProject.Solution; 851Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken) 924public async ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken) 974Solution newSolution,
EditAndContinue\EditAndContinueDiagnosticUpdateSource.cs (1)
80public void ReportDiagnostics(Workspace workspace, Solution solution, ImmutableArray<DiagnosticData> diagnostics, ImmutableArray<(DocumentId, ImmutableArray<RudeEditDiagnostic> Diagnostics)> rudeEdits)
EditAndContinue\EditAndContinueWorkspaceService.cs (6)
117Solution solution, 162private static IEnumerable<(Project, IEnumerable<DocumentState>)> GetDocumentStatesGroupedByProject(Solution solution, ImmutableArray<DocumentId> documentIds) 201Solution solution, 230public ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(DebuggingSessionId sessionId, Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken) 252public ValueTask<LinePositionSpan?> GetCurrentActiveStatementPositionAsync(DebuggingSessionId sessionId, Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken) 265public ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(DebuggingSessionId sessionId, Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken)
EditAndContinue\EditSession.cs (5)
265public static async ValueTask<bool> HasChangesAsync(Solution oldSolution, Solution newSolution, string sourceFilePath, CancellationToken cancellationToken) 288public static async ValueTask<bool> HasChangesAsync(Solution oldSolution, Solution newSolution, CancellationToken cancellationToken) 795public async ValueTask<SolutionUpdate> EmitSolutionUpdateAsync(Solution solution, ActiveStatementSpanProvider solutionActiveStatementSpanProvider, UpdateId updateId, CancellationToken cancellationToken)
EditAndContinue\EmitSolutionUpdateResults.cs (5)
72public Data Dehydrate(Solution solution) 75public ImmutableArray<DiagnosticData> GetDiagnosticData(Solution solution) 94public DiagnosticData? GetSyntaxErrorData(Solution solution) 105public async Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync(Solution solution, CancellationToken cancellationToken) 132Solution solution,
EditAndContinue\IActiveStatementSpanProvider.cs (1)
27ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken);
EditAndContinue\IEditAndContinueWorkspaceService.cs (5)
17ValueTask<EmitSolutionUpdateResults> EmitSolutionUpdateAsync(DebuggingSessionId sessionId, Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, CancellationToken cancellationToken); 22ValueTask<DebuggingSessionId> StartDebuggingSessionAsync(Solution solution, IManagedHotReloadService debuggerService, IPdbMatchingSourceTextProvider sourceTextProvider, ImmutableArray<DocumentId> captureMatchingDocuments, bool captureAllMatchingDocuments, bool reportDiagnostics, CancellationToken cancellationToken); 26ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(DebuggingSessionId sessionId, Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken); 27ValueTask<LinePositionSpan?> GetCurrentActiveStatementPositionAsync(DebuggingSessionId sessionId, Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken); 29ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(DebuggingSessionId sessionId, Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken);
EditAndContinue\PendingSolutionUpdate.cs (2)
14public readonly Solution Solution; 20Solution solution,
EditAndContinue\Remote\RemoteDebuggingSessionProxy.cs (5)
66public async ValueTask EndDebuggingSessionAsync(Solution compileTimeSolution, EditAndContinueDiagnosticUpdateSource diagnosticUpdateSource, IDiagnosticAnalyzerService diagnosticService, CancellationToken cancellationToken) 101Solution solution, 210public async ValueTask<LinePositionSpan?> GetCurrentActiveStatementPositionAsync(Solution solution, ActiveStatementSpanProvider activeStatementSpanProvider, ManagedInstructionId instructionId, CancellationToken cancellationToken) 227public async ValueTask<bool?> IsActiveStatementInExceptionRegionAsync(Solution solution, ManagedInstructionId instructionId, CancellationToken cancellationToken) 243public async ValueTask<ImmutableArray<ImmutableArray<ActiveStatementSpan>>> GetBaseActiveStatementSpansAsync(Solution solution, ImmutableArray<DocumentId> documentIds, CancellationToken cancellationToken)
EditAndContinue\Remote\RemoteEditAndContinueServiceProxy.cs (1)
139Solution solution,
EncapsulateField\AbstractEncapsulateFieldService.cs (14)
103public async Task<Solution> EncapsulateFieldsAsync( 112var solution = document.Project.Solution; 138private async Task<Solution> EncapsulateFieldsInCurrentProcessAsync(Document document, ImmutableArray<IFieldSymbol> fields, CleanCodeGenerationOptionsProvider fallbackOptions, bool updateReferences, CancellationToken cancellationToken) 143var currentSolution = document.Project.Solution; 154var nextSolution = await EncapsulateFieldAsync(document, currentField, updateReferences, fallbackOptions, cancellationToken).ConfigureAwait(false); 164private async Task<Solution> EncapsulateFieldAsync( 180var solution = document.Project.Solution; 208var solutionNeedingProperty = await UpdateReferencesAsync( 257private async Task<Solution> UpdateReferencesAsync( 258bool updateReferences, Solution solution, Document document, IFieldSymbol field, string finalFieldName, string generatedPropertyName, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken) 300private static async Task<Solution> RenameAsync( 301Solution solution, 339private ISet<(DocumentId documentId, TextSpan span)> GetConstructorLocations(Solution solution, INamedTypeSymbol containingType) 346Solution destinationSolution,
EncapsulateField\EncapsulateFieldResult.cs (4)
18private readonly AsyncLazy<Solution> _lazySolution; 20public EncapsulateFieldResult(string name, Glyph glyph, Func<CancellationToken, Task<Solution>> getSolutionAsync) 24_lazySolution = new AsyncLazy<Solution>(getSolutionAsync, cacheResult: true); 27public Task<Solution> GetSolutionAsync(CancellationToken cancellationToken)
ExternalAccess\UnitTesting\API\UnitTestingHotReloadService.cs (3)
85public async Task StartSessionAsync(Solution solution, ImmutableArray<string> capabilities, CancellationToken cancellationToken) 102/// where <paramref name="commitUpdates"/> was `true` or the one passed to <see cref="StartSessionAsync(Solution, ImmutableArray{string}, CancellationToken)"/> 111public async Task<(ImmutableArray<Update> updates, ImmutableArray<Diagnostic> diagnostics)> EmitSolutionUpdateAsync(Solution solution, bool commitUpdates, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\IRemoteUnitTestingSearchService.cs (1)
35public async Task<UnitTestingDocumentSpan?> TryRehydrateAsync(Solution solution, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\LegacySolutionEvents\UnitTestingLegacySolutionEventsListener.cs (1)
30private static IUnitTestingWorkCoordinator? GetCoordinator(Solution solution)
ExternalAccess\UnitTesting\SolutionCrawler\IUnitTestingDocumentTrackingServiceExtensions.cs (2)
20public static Document? GetActiveDocument(this IUnitTestingDocumentTrackingService service, Solution solution) 30public static ImmutableArray<Document> GetVisibleDocuments(this IUnitTestingDocumentTrackingService service, Solution solution)
ExternalAccess\UnitTesting\SolutionCrawler\IUnitTestingSolutionCrawlerRegistrationService.cs (1)
14IUnitTestingWorkCoordinator Register(Solution solution);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerLogger.cs (2)
193public static void LogIncrementalAnalyzerProcessorStatistics(int correlationId, Solution solution, CountLogAggregator<object> logAggregator, ImmutableArray<IUnitTestingIncrementalAnalyzer> analyzers) 236private static int GetSolutionHash(Solution solution)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (4)
39private Solution _lastReportedSolution = null!; 56public IUnitTestingWorkCoordinator Register(Solution solution) 173var solution = coordinator.Registration.GetSolutionToAnalyze(); 345public Solution GetSolutionToAnalyze()
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (15)
178var solution = _registration.GetSolutionToAnalyze(); 329private void EnqueueSolutionChangedEvent(Solution oldSolution, Solution newSolution, string eventName) 356private void EnqueueFullSolutionEvent(Solution solution, UnitTestingInvocationReasons invocationReasons, string eventName) 370private void EnqueueProjectChangedEvent(Solution oldSolution, Solution newSolution, ProjectId projectId, string eventName) 384private void EnqueueFullProjectEvent(Solution solution, ProjectId projectId, UnitTestingInvocationReasons invocationReasons, string eventName) 390private void EnqueueFullDocumentEvent(Solution solution, DocumentId documentId, UnitTestingInvocationReasons invocationReasons, string eventName) 402private void EnqueueDocumentChangedEvent(Solution oldSolution, Solution newSolution, DocumentId documentId, string eventName) 518var solution = _registration.GetSolutionToAnalyze(); 637var solution = _workCoordinator._registration.GetSolutionToAnalyze(); 688public string GetLanguagesStringForTelemetry(Solution solution) 734public int GetDocumentCount(Solution solution) 777public IEnumerable<(Project project, DocumentId documentId)> GetDocumentIds(Solution solution)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingLowPriorityProcessor.cs (1)
145var processingSolution = Processor._registration.GetSolutionToAnalyze();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (6)
41private Solution? _lastSolution = null; 301var solution = Processor._registration.GetSolutionToAnalyze(); 544var currentSolution = Processor._registration.GetSolutionToAnalyze(); 545var oldSolution = _lastSolution; 559void ResetLogAggregatorIfNeeded(Solution currentSolution, Solution? oldSolution)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (4)
176var solution = thisDocument.Project.Solution; 223var solution = project.Solution; 300private static IEnumerable<ProjectId> GetProjectsToAnalyze(Solution solution, ProjectId projectId) 427var solution = _registration.GetSolutionToAnalyze();
ExternalAccess\VSTypeScript\Api\VSTypeScriptDiagnosticsUpdatedArgsWrapper.cs (1)
16public Solution? Solution
ExternalAccess\Watch\Api\WatchHotReloadService.cs (3)
74public async Task StartSessionAsync(Solution solution, CancellationToken cancellationToken) 90/// the one passed to <see cref="StartSessionAsync(Solution, CancellationToken)"/> for the first invocation. 97public async Task<(ImmutableArray<Update> updates, ImmutableArray<Diagnostic> diagnostics)> EmitSolutionUpdateAsync(Solution solution, CancellationToken cancellationToken)
ExtractClass\AbstractExtractClassRefactoringProvider.cs (1)
37var solution = context.Document.Project.Solution;
ExtractClass\ExtractClassWithDialogCodeAction.cs (7)
126var solutionWithUpdatedOriginalType = await GetSolutionWithBaseAddedAsync( 139var finalSolution = await PullMembersUpAsync( 149private async Task<Solution> PullMembersUpAsync( 150Solution solution, 233private static async Task<Solution> GetSolutionWithBaseAddedAsync( 234Solution solution, 240var unformattedSolution = solution;
ExtractInterface\AbstractExtractInterfaceService.cs (17)
38protected abstract Task<Solution> UpdateMembersWithExplicitImplementationsAsync( 39Solution unformattedSolution, 143var solution = refactoringResult.DocumentToExtractFrom.Project.Solution; 179Solution solution, string containingNamespaceDisplay, INamedTypeSymbol extractedInterfaceSymbol, 200var completedUnformattedSolution = await GetSolutionWithOriginalTypeUpdatedAsync( 210var completedSolution = await GetFormattedSolutionAsync( 223Solution solution, ExtractInterfaceTypeAnalysisResult refactoringResult, INamedTypeSymbol extractedInterfaceSymbol, 242var unformattedSolution = documentWithInterface.Project.Solution; 245var unformattedSolutionWithUpdatedType = await GetSolutionWithOriginalTypeUpdatedAsync( 251var completedSolution = await GetFormattedSolutionAsync( 293private static async Task<Solution> GetFormattedSolutionAsync(Solution unformattedSolution, IEnumerable<DocumentId> documentIds, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken) 298var formattedSolution = unformattedSolution; 323private async Task<Solution> GetSolutionWithOriginalTypeUpdatedAsync( 324Solution solution, 341var unformattedSolution = solution; 368var updatedUnformattedSolution = await UpdateMembersWithExplicitImplementationsAsync(
ExtractInterface\ExtractInterfaceResult.cs (2)
12public Solution UpdatedSolution { get; } 15public ExtractInterfaceResult(bool succeeded, Solution updatedSolution = null, DocumentId navigationDocumentId = null)
FindUsages\AbstractFindUsagesService.ProgressAdapter.cs (2)
59private readonly Solution _solution; 81Solution solution, IFindUsagesContext context, FindReferencesSearchOptions options)
FindUsages\AbstractFindUsagesService_FindImplementations.cs (5)
43var solution = project.Solution; 75var solution = project.Solution; 94Solution solution, ISymbol symbol, CancellationToken cancellationToken) 137Solution solution, ISymbol symbol, CancellationToken cancellationToken) 159Solution solution, ISymbol symbol, CancellationToken cancellationToken)
FindUsages\AbstractFindUsagesService_FindReferences.cs (3)
70Solution solution, 135var solution = project.Solution; 222var solution = document.Project.Solution;
FindUsages\DefinitionItem.cs (1)
240Solution solution,
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
63private async ValueTask<(Project? project, ISymbol? symbol)> TryResolveSymbolAsync(Solution solution, string symbolKey, CancellationToken cancellationToken)
FindUsages\DefinitionItem.DetachedDefinitionItem.cs (1)
88public async Task<DefaultDefinitionItem?> TryRehydrateAsync(Solution solution, CancellationToken cancellationToken)
FindUsages\FindUsagesHelpers.cs (1)
26/// Note that the <see cref="Solution"/> returned may absolutely *not* be
FindUsages\IDefinitionsAndReferencesFactory.cs (9)
30Solution solution, DefinitionItem definitionItem, CancellationToken cancellationToken); 47Solution solution, DefinitionItem definitionItem, CancellationToken cancellationToken) 60Solution solution, 66Solution solution, 74Solution solution, 83Solution solution, 96this SymbolGroup group, IFindUsagesContext context, Solution solution, FindReferencesSearchOptions options, bool isPrimary, bool includeHiddenLocations, CancellationToken cancellationToken) 111Solution solution, 161private static ImmutableArray<DocumentSpan> TryGetSourceLocations(ISymbol definition, Solution solution, ImmutableArray<Location> locations, bool includeHiddenLocations)
FindUsages\IRemoteFindUsagesService.cs (5)
89private readonly Solution _solution; 93public FindUsagesServerCallback(Solution solution, IFindUsagesContext context) 178public async ValueTask<DocumentSpan> RehydrateAsync(Solution solution, CancellationToken cancellationToken) 250public async ValueTask<DefinitionItem.DefaultDefinitionItem> RehydrateAsync(Solution solution, CancellationToken cancellationToken) 299public async Task<SourceReferenceItem> RehydrateAsync(Solution solution, DefinitionItem definition, CancellationToken cancellationToken)
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
124Solution originalSolution,
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.GenerateConstructorWithDialogCodeAction.cs (1)
99var solution = _document.Project.Solution;
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndHashWithDialogCodeAction.cs (1)
70var solution = _document.Project.Solution;
GenerateMember\GenerateParameterizedMember\TypeParameterSubstitution.cs (2)
99var solution = _project.Solution; 137var solution = _project.Solution;
GenerateMember\GenerateVariable\AbstractGenerateVariableService.GenerateParameterCodeAction.cs (1)
44protected override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
GenerateType\AbstractGenerateTypeService.cs (2)
63internal abstract Task<Solution> TryAddUsingsOrImportToDocumentAsync( 64Solution updatedSolution, SyntaxNode modifiedRoot, Document document, TSimpleNameSyntax simpleName, string includeUsingsOrImports, AddImportPlacementOptionsProvider fallbackOptions, CancellationToken cancellationToken);
GenerateType\AbstractGenerateTypeService.Editor.cs (8)
278var newSolution = projectToBeUpdated.Solution.AddDocument(newDocumentId, documentName, string.Empty, folders, fullFilePath); 356var updatedSolution = projectToBeUpdated.Solution.AddDocument( 379private static Solution AddProjectReference(Project projectToBeUpdated, Project triggeringProject, Solution updatedSolution) 397var solution = _semanticDocument.Project.Solution; 444var solution = _semanticDocument.Project.Solution; 454var updatedSolution = solution.WithDocumentSyntaxRoot(generateTypeOptionsResult.ExistingDocument.Id, newRoot, PreservationMode.PreserveIdentity); 561var solution = _semanticDocument.Project.Solution;
GoToBase\AbstractGoToBaseService.cs (2)
18Solution solution, IMethodSymbol constructor, CancellationToken cancellationToken); 45var solution = project.Solution;
GoToBase\FindBaseHelpers.cs (1)
18ISymbol symbol, Solution solution, CancellationToken cancellationToken)
InheritanceMargin\AbstractInheritanceMarginService.cs (1)
49var solution = document.Project.Solution;
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (11)
60var solution = project.Solution; 270Solution solution, 330Solution solution, 387Solution solution, 425Solution solution, 450Solution solution, 489Solution solution, 537Solution solution, 607Solution solution, 665Solution solution, 700private static DefinitionItem? ToSlimDefinitionItem(ISymbol symbol, Solution solution)
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (4)
377private async Task<Solution> AddAllSymbolInitializationsAsync( 399var currentSolution = document.WithSyntaxRoot(trackedRoot).Project.Solution; 443private async Task<Solution> AddSingleSymbolInitializationAsync( 504var currentSolution = document.Project.Solution;
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (2)
289private async Task<Solution> InlineMethodAsync(Document document, 337var solution = document.Project.Solution;
Intents\IntentResult.cs (2)
18public readonly Solution Solution; 36public IntentProcessorResult(Solution solution, ImmutableArray<DocumentId> changedDocuments, string title, string actionName)
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (2)
229private async Task<Solution> IntroduceParameterAsync(Document originalDocument, TExpressionSyntax expression, 235var modifiedSolution = originalDocument.Project.Solution;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (3)
110var metadataSolution = metadataWorkspace.CurrentSolution; 229private async Task<Location> RelocateSymbol_NoLockAsync(Solution solution, MetadataAsSourceGeneratedFileInfo fileInfo, SymbolKey symbolId, CancellationToken cancellationToken) 329var solution = fileInfo.Workspace.CurrentSolution;
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (10)
81var fixedSolution = await RefactorAndMoveAsync( 129var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, newDoc.Project.Solution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false); 142var movedSolution = await MembersPuller.PullMembersUpAsync(sourceDoc, pullMembersUpOptions, _fallbackOptions, cancellationToken).ConfigureAwait(false); 168private async Task<Solution> RefactorAndMoveAsync( 171Solution oldSolution, 190var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, oldSolution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false); 211private static async Task<Solution> RefactorReferencesAsync( 213Solution solution, 219var updatedSolution = solution; 341Solution solution,
MoveToNamespace\AbstractMoveToNamespaceService.cs (6)
227var originalSolution = document.Project.Solution; 229var changedSolution = await changeNamespaceService.ChangeNamespaceAsync( 256var modifiedSolution = await moveTypeService.GetModifiedSolutionAsync( 267var mergedSolution = await PropagateChangeToLinkedDocumentsAsync(modifiedDocument, formattingOptions, cancellationToken).ConfigureAwait(false); 284private static async Task<Solution> PropagateChangeToLinkedDocumentsAsync(Document document, SyntaxFormattingOptions formattingOptions, CancellationToken cancellationToken) 289var solution = formattedDocument.Project.Solution;
MoveToNamespace\MoveToNamespaceResult.cs (4)
16public Solution UpdatedSolution { get; } 17public Solution OriginalSolution { get; } 23Solution originalSolution, 24Solution updatedSolution,
NamingStyleCodeFixProvider.cs (6)
106private static async Task<Solution> FixAsync( 117private readonly Solution _startingSolution; 123private readonly Func<CancellationToken, Task<Solution>> _createChangedSolutionAsync; 135Solution startingSolution, 140Func<CancellationToken, Task<Solution>> createChangedSolutionAsync, 160var newSolution = await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false);
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
64var solution = project.Solution;
NavigateTo\AbstractNavigateToSearchService.cs (1)
31Solution solution, Document? activeDocument, Func<INavigateToSearchResult, Task> onResultFound, CancellationToken cancellationToken)
NavigateTo\AbstractNavigateToSearchService.GeneratedDocumentSearch.cs (1)
25var solution = project.Solution;
NavigateTo\AbstractNavigateToSearchService.InProcess.cs (1)
211var solution = document.Project.Solution;
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (2)
29var solution = document.Project.Solution; 65var solution = project.Solution;
NavigateTo\INavigateToSearcherHost.cs (2)
31private readonly Solution _solution; 45Solution solution,
NavigateTo\NavigateToSearcher.cs (3)
34private readonly Solution _solution; 47Solution solution, 74Solution solution,
NavigateTo\NavigateToUtilities.cs (1)
16public static ImmutableHashSet<string> GetKindsProvided(Solution solution)
NavigateTo\RoslynNavigateToItem.cs (2)
82Solution solution, Document? activeDocument, CancellationToken cancellationToken) 157var solution = firstProject.Solution;
Navigation\NavigableItemFactory.cs (3)
20Solution solution, ISymbol symbol, Location location, 28Solution solution, 39Solution solution, ISymbol symbol, CancellationToken cancellationToken)
Navigation\NavigableItemFactory.SymbolLocationNavigableItem.cs (2)
17private readonly Solution _solution; 22Solution solution,
NavigationBar\AbstractNavigationBarItemService.cs (3)
44Solution solution, ISymbol symbol, SyntaxTree tree, Func<SyntaxReference, TextSpan> computeFullSpan) 50Solution solution, ISymbol symbol, SyntaxTree tree, 91Solution solution, ISymbol symbol, SyntaxTree tree, ISymbolDeclarationService symbolDeclarationService)
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
409var solution = info.SourceWorkspace.CurrentSolution;
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
102Solution solution,
PullMemberUp\Dialog\PullMemberUpWithDialogCodeAction.cs (1)
52var changedSolution = await MembersPuller.PullMembersUpAsync(_document, pullMemberUpOptions, _fallbackOptions, cancellationToken).ConfigureAwait(false);
PullMemberUp\MemberAndDestinationValidator.cs (1)
14public static bool IsDestinationValid(Solution solution, INamedTypeSymbol destination, CancellationToken cancellationToken)
PullMemberUp\MembersPuller.cs (5)
63public static Task<Solution> PullMembersUpAsync( 96private static async Task<Solution> PullMembersIntoInterfaceAsync( 102var solution = document.Project.Solution; 275private static async Task<Solution> PullMembersIntoClassAsync( 281var solution = document.Project.Solution;
QuickInfo\CommonSemanticQuickInfoProvider.cs (1)
81var solution = document.Project.Solution;
Rename\SymbolicRenameInfo.cs (1)
221var solution = document.Project.Solution;
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (14)
158private async Task<Solution> ReplaceMethodsWithPropertyAsync( 170var originalSolution = project.Solution; 188var updatedSolution = originalSolution; 196private async Task<Solution> UpdateReferencesAsync(Solution updatedSolution, string propertyName, bool nameChanged, ILookup<Document, ReferenceLocation> getReferencesByDocument, ILookup<Document, ReferenceLocation> setReferencesByDocument, CancellationToken cancellationToken) 213private async Task<Solution> UpdateReferencesInDocumentAsync( 216Solution updatedSolution, 315private static async Task<Solution> ReplaceGetMethodsAndRemoveSetMethodsAsync( 316Solution originalSolution, 317Solution updatedSolution, 344private static async Task<Solution> ReplaceGetMethodsAndRemoveSetMethodsAsync( 347Solution updatedSolution, 403Solution updatedSolution, 451Solution originalSolution,
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (14)
75private async Task<Solution> ReplacePropertyWithMethodsAsync( 89var originalSolution = document.Project.Solution; 107var updatedSolution = originalSolution; 199private async Task<Solution> UpdateReferencesAsync( 200Solution updatedSolution, 218private async Task<Solution> UpdateReferencesInDocumentAsync( 219Solution updatedSolution, 292private static async Task<Solution> ReplaceDefinitionsWithMethodsAsync( 293Solution originalSolution, 294Solution updatedSolution, 316Solution originalSolution, 343private static async Task<Solution> ReplaceDefinitionsWithMethodsAsync( 344Solution updatedSolution, 397Solution updatedSolution,
Shared\Extensions\DocumentExtensions.cs (1)
88var solution = document.Project.Solution;
Shared\Utilities\AnnotatedSymbolMapping.cs (4)
26public Solution AnnotatedSolution { get; } 40Solution annotatedSolution, 57Solution solution, 105var annotatedSolution = solution;
Shared\Utilities\ExtractTypeHelpers.cs (2)
51Solution solution, 64var solutionWithInterfaceDocument = solution.AddDocument(newDocumentId, fileName, text: "", folders: folders, filePath: newDocumentPath);
Shared\Utilities\SupportedPlatformData.cs (2)
21public readonly Solution Solution; 23public SupportedPlatformData(Solution solution, List<ProjectId> invalidProjects, IEnumerable<ProjectId> candidateProjects)
SolutionCrawler\IDocumentTrackingServiceExtensions.cs (2)
20public static Document? GetActiveDocument(this IDocumentTrackingService service, Solution solution) 30public static ImmutableArray<Document> GetVisibleDocuments(this IDocumentTrackingService service, Solution solution)
SolutionCrawler\IncrementalAnalyzerBase.cs (1)
17public virtual Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken)
SolutionCrawler\SolutionCrawlerLogger.cs (2)
187public static void LogIncrementalAnalyzerProcessorStatistics(int correlationId, Solution solution, CountLogAggregator<object> logAggregator, ImmutableArray<IIncrementalAnalyzer> analyzers) 228private static int GetSolutionHash(Solution solution)
SolutionCrawler\SolutionCrawlerRegistrationService.cs (1)
320public Solution GetSolutionToAnalyze()
SolutionCrawler\WorkCoordinator.cs (16)
143var solution = _registration.GetSolutionToAnalyze(); 154var solution = _registration.GetSolutionToAnalyze(); 276private void EnqueueSolutionChangedEvent(Solution oldSolution, Solution newSolution, string eventName) 303private void EnqueueFullSolutionEvent(Solution solution, InvocationReasons invocationReasons, string eventName) 317private void EnqueueProjectChangedEvent(Solution oldSolution, Solution newSolution, ProjectId projectId, string eventName) 331private void EnqueueFullProjectEvent(Solution solution, ProjectId projectId, InvocationReasons invocationReasons, string eventName) 337private void EnqueueFullDocumentEvent(Solution solution, DocumentId documentId, InvocationReasons invocationReasons, string eventName) 349private void EnqueueDocumentChangedEvent(Solution oldSolution, Solution newSolution, DocumentId documentId, string eventName) 461var solution = _registration.GetSolutionToAnalyze(); 570var solution = _workCoordinator._registration.GetSolutionToAnalyze(); 621public string GetLanguagesStringForTelemetry(Solution solution) 667public int GetDocumentCount(Solution solution) 710public IEnumerable<(Project project, DocumentId documentId)> GetDocumentIds(Solution solution)
SolutionCrawler\WorkCoordinator.HighPriorityProcessor.cs (2)
146var solution = _processor._registration.GetSolutionToAnalyze(); 182private async Task ProcessDocumentAsync(Solution solution, ImmutableArray<IIncrementalAnalyzer> analyzers, WorkItem workItem, CancellationToken cancellationToken)
SolutionCrawler\WorkCoordinator.LowPriorityProcessor.cs (1)
133var processingSolution = Processor._registration.GetSolutionToAnalyze();
SolutionCrawler\WorkCoordinator.NormalPriorityProcessor.cs (6)
40private Solution? _lastSolution = null; 287var solution = Processor._registration.GetSolutionToAnalyze(); 496var currentSolution = Processor._registration.GetSolutionToAnalyze(); 497var oldSolution = _lastSolution; 511void ResetLogAggregatorIfNeeded(Solution currentSolution, Solution? oldSolution)
SolutionCrawler\WorkCoordinator.SemanticChangeProcessor.cs (4)
175var solution = thisDocument.Project.Solution; 222var solution = project.Solution; 299private static IEnumerable<ProjectId> GetProjectsToAnalyze(Solution solution, ProjectId projectId) 426var solution = _registration.GetSolutionToAnalyze();
StackTraceExplorer\IStackTraceExplorerService.cs (2)
21(Document? document, int line) GetDocumentAndLine(Solution solution, ParsedFrame frame); 22Task<DefinitionItem?> TryFindDefinitionAsync(Solution solution, ParsedFrame frame, StackFrameSymbolPart symbolPart, CancellationToken cancellationToken);
StackTraceExplorer\StackTraceExplorerService.cs (3)
29public (Document? document, int line) GetDocumentAndLine(Solution solution, ParsedFrame frame) 45public async Task<DefinitionItem?> TryFindDefinitionAsync(Solution solution, ParsedFrame frame, StackFrameSymbolPart symbolPart, CancellationToken cancellationToken) 77private static ImmutableArray<Document> GetFileMatches(Solution solution, StackFrameCompilationUnit root, out int lineNumber)
StackTraceExplorer\StackTraceExplorerUtilities.cs (1)
25public static async Task<DefinitionItem?> GetDefinitionAsync(Solution solution, StackFrameCompilationUnit compilationUnit, StackFrameSymbolPart symbolPart, CancellationToken cancellationToken)
SymbolMapping\SymbolMappingResult.cs (1)
23public Solution Solution => Project.Solution;
SyncNamespaces\AbstractSyncNamespacesService.cs (4)
31public async Task<Solution> SyncNamespacesAsync( 39var solution = projects[0].Solution; 92Solution solution, 135private static async Task<Solution> ApplyCodeFixAsync(
SyncNamespaces\ISyncNamespacesService.cs (1)
19Task<Solution> SyncNamespacesAsync(ImmutableArray<Project> projects, CodeActionOptionsProvider options, CancellationToken cancellationToken);
UnusedReferences\IUnusedReferenceAnalysisService.cs (1)
16Solution solution,
UnusedReferences\UnusedReferencesRemover.cs (2)
28Solution solution, 268Solution solution,
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (6)
69private async Task<Solution> ProcessResultAsync(CodeFixContext context, Diagnostic diagnostic, CancellationToken cancellationToken) 75var solution = context.Document.Project.Solution; 231var updatedSolution = solution.WithDocumentSyntaxRoot(fieldDocument.Id, newFieldTreeRoot); 265Solution solution, 308Solution solution, 348public UseAutoPropertyCodeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution
ValueTracking\IValueTrackingService.cs (1)
17Task<ImmutableArray<ValueTrackedItem>> TrackValueSourceAsync(Solution solution, ValueTrackedItem previousTrackedItem, CancellationToken cancellationToken);
ValueTracking\SerializableValueTrackedItem.cs (2)
41public static SerializableValueTrackedItem Dehydrate(Solution solution, ValueTrackedItem valueTrackedItem, CancellationToken cancellationToken) 52public async ValueTask<ValueTrackedItem> RehydrateAsync(Solution solution, CancellationToken cancellationToken)
ValueTracking\ValueTrackedItem.cs (1)
49public static async ValueTask<ValueTrackedItem?> TryCreateAsync(Solution solution, Location location, ISymbol symbol, ValueTrackedItem? parent = null, CancellationToken cancellationToken = default)
ValueTracking\ValueTracker.cs (3)
37var solution = document.Project.Solution; 75Solution solution, 322private static async Task<ISymbol?> GetSymbolAsync(ValueTrackedItem? item, Solution solution, CancellationToken cancellationToken)
ValueTracking\ValueTracker.OperationCollector.cs (2)
21public Solution Solution { get; } 23public OperationCollector(ValueTrackingProgressCollector progressCollector, Solution solution)
ValueTracking\ValueTrackingProgressCollector.cs (1)
40internal async Task<bool> TryReportAsync(Solution solution, Location location, ISymbol symbol, CancellationToken cancellationToken = default)
ValueTracking\ValueTrackingService.cs (2)
37var solution = document.Project.Solution; 59Solution solution,
Workspace\BackgroundCompiler.cs (1)
93Solution solution,
Workspace\CompileTimeSolutionProvider.cs (11)
54private readonly ConditionalWeakTable<Solution, Solution> _designTimeToCompileTimeSolution = new(); 59private Solution? _lastCompileTimeSolution; 83public Solution GetCompileTimeSolution(Solution designTimeSolution) 87_designTimeToCompileTimeSolution.TryGetValue(designTimeSolution, out var cachedCompileTimeSolution); 93var staleSolution = _lastCompileTimeSolution; 94var compileTimeSolution = designTimeSolution; 168Solution compileTimeSolution, 220Solution compileTimeSolution, 222Solution designTimeSolution,
Workspace\ICompileTimeSolutionProvider.cs (2)
14Solution GetCompileTimeSolution(Solution designTimeSolution);
Microsoft.CodeAnalysis.LanguageServer.Protocol (64)
Extensions\Extensions.cs (7)
36public static ImmutableArray<Document> GetDocuments(this Solution solution, Uri documentUri) 45public static ImmutableArray<DocumentId> GetDocumentIds(this Solution solution, Uri documentUri) 60public static Document? GetDocument(this Solution solution, TextDocumentIdentifier documentIdentifier) 99public static T FindDocumentInProjectContext<T>(this ImmutableArray<T> documents, TextDocumentIdentifier documentIdentifier, Func<Solution, DocumentId, T> documentGetter) where T : TextDocument 106var solution = documents.First().Project.Solution; 113public static Project? GetProject(this Solution solution, TextDocumentIdentifier projectIdentifier) 121public static TextDocument? GetAdditionalDocument(this Solution solution, TextDocumentIdentifier documentIdentifier)
Features\CodeCleanup\AbstractCodeCleanupService.cs (1)
187var solution = await fixAllService.GetFixAllChangedSolutionAsync(
Features\CodeFixes\CodeFixService.cs (1)
313var solution = await fixAllService.GetFixAllChangedSolutionAsync(
Features\CodeFixes\CodeFixService.FixAllDiagnosticProvider.cs (1)
47var solution = document.Project.Solution;
Features\Diagnostics\DefaultDiagnosticAnalyzerService.cs (1)
239public Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken)
Features\Diagnostics\DiagnosticAnalyzerService.cs (4)
139public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(Solution solution, ProjectId? projectId = null, DocumentId? documentId = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 149public async Task ForceAnalyzeAsync(Solution solution, Action<Project> onProjectAnalyzed, ProjectId? projectId = null, CancellationToken cancellationToken = default) 181Solution solution, ProjectId? projectId = null, DocumentId? documentId = null, ImmutableHashSet<string>? diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 192Solution solution, ProjectId? projectId = null, ImmutableHashSet<string>? diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (2)
179ProjectId projectId, Solution? solution, StateSet stateSet, Action<DiagnosticsUpdatedArgs> raiseEvents) 206DocumentId documentId, Solution? solution, StateSet stateSet, AnalysisKind kind, Action<DiagnosticsUpdatedArgs> raiseEvents)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_BuildSynchronization.cs (1)
36var solution = Workspace.CurrentSolution;
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (10)
19public Task<ImmutableArray<DiagnosticData>> GetSpecificCachedDiagnosticsAsync(Solution solution, object id, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 30public Task<ImmutableArray<DiagnosticData>> GetCachedDiagnosticsAsync(Solution solution, ProjectId? projectId, DocumentId? documentId, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 33public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(Solution solution, ProjectId? projectId, DocumentId? documentId, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 36public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 39public Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync(Solution solution, ProjectId? projectId, ImmutableHashSet<string>? diagnosticIds, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default) 46protected readonly Solution Solution; 55Solution solution, 100protected async Task AppendDiagnosticsAsync(Solution solution, CancellationToken cancellationToken) 140public IdeCachedDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, ProjectId? projectId, DocumentId? documentId, bool includeSuppressedDiagnostics) 232public IdeLatestDiagnosticGetter(DiagnosticIncrementalAnalyzer owner, Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, bool includeSuppressedDiagnostics)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (1)
364public Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken)
Features\UnifiedSuggestions\UnifiedSuggestedActionSet.cs (2)
17public Solution OriginalSolution { get; } 30Solution originalSolution,
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (11)
45var originalSolution = document.Project.Solution; 70Solution originalSolution, 91Solution originalSolution, 103Solution originalSolution, 133Solution originalSolution, 149async Task<IUnifiedSuggestedAction> GetUnifiedSuggestedActionAsync(Solution originalSolution, CodeAction action, CodeFix fix) 218Solution originalSolution, 282Solution originalSolution, 390Solution originalSolution, 519var originalSolution = document.Project.Solution; 609var originalSolution = document.Project.Solution;
Handler\CodeActions\CodeActionResolveHandler.cs (1)
65var solution = document.Project.Solution;
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
233static ProjectOrDocumentId? GetIdForPreviousResult(TextDocumentIdentifier textDocumentIdentifier, Solution solution)
Handler\Diagnostics\WorkspacePullDiagnosticHandler.cs (3)
93Solution solution, ImmutableArray<string> supportedLanguages) 100static IEnumerable<Project?> GetProjectsInPriorityOrderWorker(Solution solution) 169var solution = context.Solution;
Handler\PullHandlers\VersionedPullCache`2.cs (1)
127private static async Task<bool> IsFullyLoadedAsync(Solution solution, CancellationToken cancellationToken)
Handler\Rename\RenameHandler.cs (2)
43var oldSolution = document.Project.Solution; 73var renamedSolution = renameReplacementInfo.NewSolution;
Handler\RequestContext.cs (3)
56public readonly Solution? Solution; 88Solution? solution, 162Solution? solution = null;
Handler\SpellCheck\WorkspaceSpellCheckHandler.cs (1)
37var solution = context.Solution;
Handler\Symbols\WorkspaceSymbolsHandler.cs (1)
58var solution = context.Solution;
Workspaces\LspWorkspaceManager.cs (9)
54private readonly Dictionary<Workspace, (int? forkedFromVersion, Solution solution)> _cachedLspSolutions = new(); 158public async Task<(Workspace?, Solution?)> GetLspSolutionInfoAsync(CancellationToken cancellationToken) 176public async Task<(Workspace?, Solution?, Document?)> GetLspDocumentInfoAsync(TextDocumentIdentifier textDocumentIdentifier, CancellationToken cancellationToken) 224private async Task<ImmutableArray<(Workspace workspace, Solution Solution, bool IsForked)>> GetLspSolutionsAsync(CancellationToken cancellationToken) 233using var _ = ArrayBuilder<(Workspace, Solution, bool)>.GetInstance(out var solutions); 246async Task<(Solution Solution, bool IsForked)> GetLspSolutionForWorkspaceAsync(Workspace workspace, CancellationToken cancellationToken) 248var workspaceCurrentSolution = workspace.CurrentSolution; 296var lspSolution = workspaceCurrentSolution; 342private static ImmutableDictionary<Uri, ImmutableArray<Document>> GetDocumentsForUris(ImmutableArray<Uri> trackedDocuments, Solution workspaceCurrentSolution)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (21)
Completion\CompletionTests.cs (5)
210var solution = testLspServer.TestWorkspace.CurrentSolution; 377var solution = testLspServer.GetCurrentSolution(); 414var solution = testLspServer.GetCurrentSolution(); 451var solution = testLspServer.GetCurrentSolution(); 503var solution = testLspServer.GetCurrentSolution();
Diagnostics\AdditionalFileDiagnosticsTests.cs (2)
77var initialSolution = testLspServer.GetCurrentSolution(); 78var newSolution = initialSolution.RemoveAdditionalDocument(initialSolution.Projects.Single().AdditionalDocumentIds.Single());
Diagnostics\PullDiagnosticTests.cs (1)
255var solution = document.Project.Solution;
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (2)
57var initialSolution = testLspServer.GetCurrentSolution(); 58var newSolution = initialSolution.RemoveProject(initialSolution.Projects.First().Id);
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (3)
39var solution = await GetLSPSolutionAsync(testLspServer, caretLocation.Uri).ConfigureAwait(false); 90var solution = await GetLSPSolutionAsync(testLspServer, caretLocation.Uri).ConfigureAwait(false); 102private static async Task<Solution> GetLSPSolutionAsync(TestLspServer testLspServer, Uri uri)
Ordering\RequestOrderingTests.cs (4)
192var expectedSolution = testLspServer.GetCurrentSolution(); 195var solution = await GetLSPSolution(testLspServer, NonMutatingRequestHandler.MethodName); 232var solution = await GetLSPSolution(testLspServer, NonLSPSolutionRequestHandler.MethodName); 256private static async Task<Solution?> GetLSPSolution(TestLspServer testLspServer, string methodName)
SpellCheck\SpellCheckTests.cs (1)
87var solution = document.Project.Solution;
Symbols\WorkspaceSymbolsTests.cs (1)
221private static string GetContainerName(Solution solution, string? containingSymbolName = null)
Workspaces\LspWorkspaceManagerTests.cs (2)
182var newSolution = testLspServer.TestWorkspace.CurrentSolution.AddDocument(newDocumentId, "NewDoc.cs", SourceText.From("New Doc", System.Text.Encoding.UTF8, SourceHashAlgorithms.Default), filePath: @"C:\NewDoc.cs"); 506private static Task<(Workspace?, Solution?)> GetLspHostWorkspaceAndSolutionAsync(TestLspServer testLspServer)
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (3)
CompilerInvocation.cs (1)
99var solution = workspace.CurrentSolution.AddProject(projectInfo);
Program.cs (2)
175Func<MSBuildWorkspace, CancellationToken, Task<Solution>> openAsync, 185var solution = await openAsync(msbuildWorkspace, cancellationToken);
Microsoft.CodeAnalysis.Remote.ServiceHub (81)
ExternalAccess\Pythia\Api\PythiaBrokeredServiceImplementation.cs (2)
22public static ValueTask<Solution> GetSolutionAsync(this PythiaPinnedSolutionInfoWrapper solutionInfo, ServiceBrokerClient client, CancellationToken cancellationToken) 25public static ValueTask<T> RunServiceAsync<T>(this PythiaPinnedSolutionInfoWrapper solutionInfo, ServiceBrokerClient client, Func<Solution, ValueTask<T>> implementation, CancellationToken cancellationToken)
ExternalAccess\Razor\Api\RazorBrokeredServiceImplementation.cs (2)
22public static ValueTask<Solution> GetSolutionAsync(this RazorPinnedSolutionInfoWrapper solutionInfo, ServiceBrokerClient client, CancellationToken cancellationToken) 25public static ValueTask<T> RunServiceAsync<T>(this RazorPinnedSolutionInfoWrapper solutionInfo, ServiceBrokerClient client, Func<Solution, ValueTask<T>> implementation, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\Api\UnitTestingBrokeredServiceImplementation.cs (2)
31public static ValueTask<Solution> GetSolutionAsync(this UnitTestingPinnedSolutionInfoWrapper solutionInfo, ServiceBrokerClient client, CancellationToken cancellationToken) 34public static ValueTask<T> RunServiceAsync<T>(this UnitTestingPinnedSolutionInfoWrapper solutionInfo, ServiceBrokerClient client, Func<Solution, ValueTask<T>> implementation, CancellationToken cancellationToken)
Host\RemoteWorkspace.cs (23)
84/// cref="Solution"/> snapshot for it, and then invokes <paramref name="implementation"/> with that snapshot. That 95public ValueTask<(Solution solution, T result)> RunWithSolutionAsync<T>( 98Func<Solution, ValueTask<T>> implementation, 104private async ValueTask<(Solution solution, T result)> RunWithSolutionAsync<T>( 109Func<Solution, ValueTask<T>> implementation, 136async ValueTask<(InFlightSolution inFlightSolution, Task<Solution> solutionTask)> AcquireSolutionAndIncrementInFlightCountAsync() 160async ValueTask<(Solution solution, T result)> ProcessSolutionAsync(InFlightSolution inFlightSolution, Task<Solution> solutionTask) 168var solution = await solutionTask.WithCancellation(cancellationToken).ConfigureAwait(false); 225/// Create an appropriate <see cref="Solution"/> instance corresponding to the <paramref 241private async Task<Solution> ComputeDisconnectedSolutionAsync( 271private Solution CreateSolutionFromInfo(SolutionInfo solutionInfo) 273var solution = this.CreateSolution(solutionInfo); 286private async Task<Solution> TryUpdateWorkspaceCurrentSolutionAsync( 288Solution newSolution, 295private async ValueTask<(Solution solution, bool updated)> TryUpdateWorkspaceCurrentSolutionWorkerAsync( 297Solution newSolution, 332static bool IsAddingSolution(Solution oldSolution, Solution newSolution) 348public Solution CreateSolutionFromInfo(SolutionInfo solutionInfo) 351public ValueTask<(Solution solution, bool updated)> TryUpdateWorkspaceCurrentSolutionAsync(Solution newSolution, int workspaceVersion) 354public async ValueTask<Solution> GetSolutionAsync(
Host\RemoteWorkspace.InFlightSolution.cs (8)
38private readonly Task<Solution> _disconnectedSolutionTask; 45private Task<Solution>? _primaryBranchTask; 57Func<CancellationToken, Task<Solution>> computeDisconnectedSolutionAsync) 86public Task<Solution> PreferredSolutionTask_NoLock 105public void TryKickOffPrimaryBranchWork_NoLock(Func<Solution, CancellationToken, Task<Solution>> updatePrimaryBranchAsync) 135async Task<Solution> ComputePrimaryBranchAsync(CancellationToken cancellationToken) 137var solution = await _disconnectedSolutionTask.ConfigureAwait(false);
Host\RemoteWorkspace.SolutionCreator.cs (15)
35private readonly Solution _baseSolution; 37public SolutionCreator(HostServices hostServices, AssetProvider assetService, Solution baseSolution) 53public async Task<Solution> CreateSolutionAsync(Checksum newSolutionChecksum, CancellationToken cancellationToken) 57var solution = _baseSolution; 106private async Task<Solution> UpdateProjectsAsync(Solution solution, ChecksumCollection oldChecksums, ChecksumCollection newChecksums, CancellationToken cancellationToken) 121private async Task<Solution> UpdateProjectsAsync(Solution solution, HashSet<Checksum> oldChecksums, HashSet<Checksum> newChecksums, CancellationToken cancellationToken) 205private async Task<Solution> UpdateProjectAsync(Project project, ProjectStateChecksums oldProjectChecksums, ProjectStateChecksums newProjectChecksums, CancellationToken cancellationToken) 364Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 365Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments, 564private static async Task<Dictionary<ProjectId, ProjectStateChecksums>> GetProjectMapAsync(Solution solution, HashSet<Checksum> projects, CancellationToken cancellationToken) 581private async Task ValidateChecksumAsync(Checksum checksumFromRequest, Solution incrementalSolutionBuilt, CancellationToken cancellationToken)
Host\RemoteWorkspace_SolutionCaching.cs (3)
18private (Checksum checksum, Solution solution) _lastRequestedPrimaryBranchSolution; 24private (Checksum checksum, Solution solution) _lastRequestedAnyBranchSolution; 83var cachedSolution =
Host\RemoteWorkspaceManager.cs (2)
109public async ValueTask<Solution> GetSolutionAsync(ServiceBrokerClient client, Checksum solutionChecksum, CancellationToken cancellationToken) 127Func<Solution, ValueTask<T>> implementation,
Host\TestUtils.cs (5)
43Solution solutionFromScratch, 44Solution incrementalSolutionBuilt) 145public static async Task<Dictionary<Checksum, object>> GetAssetMapAsync(this Solution solution, CancellationToken cancellationToken) 164public static Task AppendAssetMapAsync(this Solution solution, Dictionary<Checksum, object> map, CancellationToken cancellationToken) 168this Solution solution, Dictionary<Checksum, object> map, ProjectId? projectId, CancellationToken cancellationToken)
Services\BrokeredServiceBase.cs (5)
87Func<Solution, ValueTask<T>> implementation, 108Checksum solutionChecksum, Func<Solution, ValueTask<T>> implementation, CancellationToken cancellationToken) 133Checksum solutionChecksum, Func<Solution, ValueTask> implementation, CancellationToken cancellationToken) 152Func<Solution, Solution, ValueTask> implementation,
Services\CodeLensReferences\RemoteCodeLensReferencesService.cs (1)
28private static async ValueTask<SyntaxNode?> TryFindNodeAsync(Solution solution, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken)
Services\ConvertTupleToStructCodeRefactoringProvider\RemoteConvertTupleToStructCodeRefactoringService.cs (8)
57var updatedSolution = await service.ConvertToStructAsync(document, span, scope, fallbackOptions, isRecord, cancellationToken).ConfigureAwait(false); 59var cleanedSolution = await CleanupAsync(solution, updatedSolution, fallbackOptions, cancellationToken).ConfigureAwait(false); 71Solution oldSolution, Solution newSolution, CancellationToken cancellationToken) 89private static async Task<Solution> CleanupAsync(Solution oldSolution, Solution newSolution, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken) 92var final = newSolution;
Services\EncapsulateField\RemoteEncapsulateFieldService.cs (1)
68var newSolution = await service.EncapsulateFieldsAsync(
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (1)
112var solution = document.Project.Solution;
Services\SymbolFinder\RemoteSymbolFinderService.cs (3)
83private static ImmutableArray<SerializableSymbolAndProjectId> Convert(ImmutableArray<ISymbol> items, Solution solution, CancellationToken cancellationToken) 201private readonly Solution _solution; 207public FindReferencesProgressCallback(Solution solution, RemoteCallback<IRemoteSymbolFinderService.ICallback> callback, RemoteServiceCallbackId callbackId)
Microsoft.CodeAnalysis.Remote.Workspaces (24)
BrokeredServiceConnection.cs (6)
170public override async ValueTask<bool> TryInvokeAsync(Solution solution, Func<TService, Checksum, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 186public override async ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Solution solution, Func<TService, Checksum, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) 236public override async ValueTask<bool> TryInvokeAsync(Solution solution, Func<TService, Checksum, RemoteServiceCallbackId, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 255public override async ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Solution solution, Func<TService, Checksum, RemoteServiceCallbackId, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) 312public override async ValueTask<bool> TryInvokeAsync(Solution solution1, Solution solution2, Func<TService, Checksum, Checksum, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\PythiaRemoteHostClient.cs (4)
68public async ValueTask<bool> TryInvokeAsync<TService>(Solution solution, Func<TService, PythiaPinnedSolutionInfoWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) where TService : class 74public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Solution solution, Func<TService, PythiaPinnedSolutionInfoWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) where TService : class 82public async ValueTask<bool> TryInvokeAsync<TService>(Solution solution, Func<TService, PythiaPinnedSolutionInfoWrapper, PythiaRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask> invocation, object callbackTarget, CancellationToken cancellationToken) where TService : class 88public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Solution solution, Func<TService, PythiaPinnedSolutionInfoWrapper, PythiaRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask<TResult>> invocation, object callbackTarget, CancellationToken cancellationToken) where TService : class
ExternalAccess\Pythia\Api\PythiaRemoteServiceConnectionWrapper.cs (4)
45public ValueTask<bool> TryInvokeAsync(Solution solution, Func<TService, PythiaPinnedSolutionInfoWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 51public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Solution solution, Func<TService, PythiaPinnedSolutionInfoWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) 59public ValueTask<bool> TryInvokeAsync(Solution solution, Func<TService, PythiaPinnedSolutionInfoWrapper, PythiaRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 65public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Solution solution, Func<TService, PythiaPinnedSolutionInfoWrapper, PythiaRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\Api\UnitTestingRemoteHostClient.cs (4)
68public async ValueTask<bool> TryInvokeAsync<TService>(Solution solution, Func<TService, UnitTestingPinnedSolutionInfoWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) where TService : class 74public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Solution solution, Func<TService, UnitTestingPinnedSolutionInfoWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) where TService : class 82public async ValueTask<bool> TryInvokeAsync<TService>(Solution solution, Func<TService, UnitTestingPinnedSolutionInfoWrapper, UnitTestingRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask> invocation, object callbackTarget, CancellationToken cancellationToken) where TService : class 88public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Solution solution, Func<TService, UnitTestingPinnedSolutionInfoWrapper, UnitTestingRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask<TResult>> invocation, object callbackTarget, CancellationToken cancellationToken) where TService : class
ExternalAccess\UnitTesting\Api\UnitTestingRemoteServiceConnectionWrapper.cs (4)
45public ValueTask<bool> TryInvokeAsync(Solution solution, Func<TService, UnitTestingPinnedSolutionInfoWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 51public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Solution solution, Func<TService, UnitTestingPinnedSolutionInfoWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) 59public ValueTask<bool> TryInvokeAsync(Solution solution, Func<TService, UnitTestingPinnedSolutionInfoWrapper, UnitTestingRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 65public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Solution solution, Func<TService, UnitTestingPinnedSolutionInfoWrapper, UnitTestingRemoteServiceCallbackIdWrapper, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
SolutionAssetStorage.cs (2)
51internal ValueTask<Scope> StoreAssetsAsync(Solution solution, CancellationToken cancellationToken) 60private async ValueTask<Scope> StoreAssetsAsync(Solution solution, ProjectId? projectId, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
GoToBase\VisualBasicGoToBaseService.vb (1)
21Protected Overrides Async Function FindNextConstructorInChainAsync(solution As Solution, constructor As IMethodSymbol, cancellationToken As CancellationToken) As Task(Of IMethodSymbol)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (6)
CodeActions\Preview\PreviewTests.vb (1)
47Protected Overrides Function GetChangedSolutionAsync(cancellationToken As CancellationToken) As Task(Of Solution)
Diagnostics\AddImport\AddImportTests_NuGet.vb (3)
160installerServiceMock.Setup(Function(i) i.GetProjectsWithInstalledPackage(It.IsAny(Of Solution), "NuGetPackage", "1.0")).Returns(ImmutableArray(Of Project).Empty) 161installerServiceMock.Setup(Function(i) i.GetProjectsWithInstalledPackage(It.IsAny(Of Solution), "NuGetPackage", "2.0")).Returns(ImmutableArray(Of Project).Empty) 233installerServiceMock.Setup(Function(i) i.GetProjectsWithInstalledPackage(It.IsAny(Of Solution), "NuGetPackage", "1.0")).Returns(ImmutableArray(Of Project).Empty)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (2)
30Private Shared Function AddDefaultTestProject(solution As Solution, source As String) As Solution
Microsoft.CodeAnalysis.VisualBasic.Features (16)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.CodeAction.vb (2)
14Private ReadOnly _solution As Solution 20Public Sub New(solution As Solution,
Debugging\BreakpointResolver.vb (1)
17Public Sub New(solution As Solution, text As String)
Debugging\VisualBasicBreakpointService.vb (1)
81solution As Solution,
ExtractInterface\VisualBasicExtractInterfaceService.vb (4)
81Private Shared Function CreateFinalSolution(solutionWithInterfaceDocument As Solution, documentIds As IEnumerable(Of DocumentId), docToRootMap As Dictionary(Of DocumentId, CompilationUnitSyntax)) As Solution 100unformattedSolution As Solution, documentIds As IReadOnlyList(Of DocumentId), extractedInterfaceSymbol As INamedTypeSymbol, 102symbolToDeclarationAnnotationMap As ImmutableDictionary(Of ISymbol, SyntaxAnnotation), cancellationToken As CancellationToken) As Task(Of Solution)
GenerateType\VisualBasicGenerateTypeService.vb (2)
624updatedSolution As Solution, 630cancellationToken As CancellationToken) As Task(Of Solution)
NavigationBar\VisualBasicNavigationBarItemService.vb (6)
102solution As Solution, 156solution As Solution, 182solution As Solution, 201solution As Solution, 310solution As Solution, 390solution As Solution,
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
Rename\LocalConflictVisitor.vb (2)
14Private ReadOnly _newSolution As Solution 17Public Sub New(tokenBeingRenamed As SyntaxToken, newSolution As Solution, cancellationToken As CancellationToken)
Rename\VisualBasicRenameRewriterLanguageService.vb (3)
42Private ReadOnly _solution As Solution 687baseSolution As Solution, 688newSolution As Solution,
Microsoft.CodeAnalysis.Workspaces (647)
AbstractCodeGenerationService_FindDeclaration.cs (5)
24public bool CanAddTo(ISymbol destination, Solution solution, CancellationToken cancellationToken) 54public bool CanAddTo(SyntaxNode destination, Solution solution, CancellationToken cancellationToken) 57private bool CanAddTo(SyntaxNode? destination, Solution solution, CancellationToken cancellationToken, 127Solution solution, 137Solution solution,
ChangeNamespace\IChangeNamespaceService.cs (2)
57Task<Solution> ChangeNamespaceAsync(Document document, SyntaxNode container, string targetNamespace, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken); 63Task<Solution?> TryChangeTopLevelNamespacesAsync(Document document, string targetNamespace, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken);
CodeActions\CodeAction.cs (27)
142Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken) 151Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken) 170Solution originalSolution, CancellationToken cancellationToken) 187var changedSolution = await GetChangedSolutionAsync(cancellationToken).ConfigureAwait(false); 214protected virtual async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 225internal virtual Task<Solution?> GetChangedSolutionAsync( 247internal async Task<Solution?> GetChangedSolutionInternalAsync(Solution originalSolution, bool postProcessChanges = true, CancellationToken cancellationToken = default) 249var solution = await GetChangedSolutionAsync(new ProgressTracker(), cancellationToken).ConfigureAwait(false); 271Solution originalSolution, IEnumerable<CodeActionOperation> operations, CancellationToken cancellationToken) 295protected Task<Solution> PostProcessChangesAsync(Solution changedSolution, CancellationToken cancellationToken) 298internal async Task<Solution> PostProcessChangesAsync( 299Solution originalSolution, 300Solution changedSolution, 310var processedSolution = changedSolution; 410/// Creates a <see cref="CodeAction"/> for a change to more than one <see cref="Document"/> within a <see cref="Solution"/>. 414/// <param name="createChangedSolution">Function to create the <see cref="Solution"/>.</param> 417public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null) 460internal static CodeAction CreateWithPriority(CodeActionPriority priority, string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string equivalenceKey) 588private readonly Func<CancellationToken, Task<Solution>> _createChangedSolution; 592Func<CancellationToken, Task<Solution>> createChangedSolution, 603Func<CancellationToken, Task<Solution>> createChangedSolution, 612Func<CancellationToken, Task<Solution>> createChangedSolution, 617protected sealed override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 638protected sealed override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 639=> SpecializedTasks.Null<Solution>();
CodeActions\CodeActionWithOptions.cs (2)
36Solution originalSolution, object? options, CancellationToken cancellationToken) 54Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
CodeActions\Operations\ApplyChangesOperation.cs (7)
39public Solution ChangedSolution { get; } 41public ApplyChangesOperation(Solution changedSolution) 49internal sealed override Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken) 54Solution originalSolution, 55Solution changedSolution, 59var currentSolution = workspace.CurrentSolution; 98var forkedSolution = currentSolution;
CodeActions\Operations\CodeActionOperation.cs (1)
34internal virtual Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgressTracker progressTracker, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (6)
40private async Task<Solution?> FixAllContextsAsync( 71var currentSolution = originalFixAllContext.Solution; 142var solution = fixAllContext.Solution; 169var changedSolution = await codeAction.GetChangedSolutionInternalAsync(solution, cancellationToken: cancellationToken).ConfigureAwait(false); 254private static async Task<Solution> ApplyChangesAsync( 255Solution currentSolution,
CodeFixes\FixAllOccurrences\DocumentBasedFixAllProvider.cs (2)
54/// other aspects of (like it's properties), or changes to the <see cref="Project"/> or <see cref="Solution"/> 74private Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalFixAllContext, ImmutableArray<FixAllContext> fixAllContexts)
CodeFixes\FixAllOccurrences\FixAllContext.cs (1)
31public Solution Solution => State.Solution;
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (1)
128Solution solution,
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
CodeFixesAndRefactorings\CommonFixAllState.cs (1)
22public Solution Solution => Project.Solution;
CodeFixesAndRefactorings\DefaultFixAllProviderHelpers.cs (9)
26Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 29var solution = fixAllContext.Scope switch 45private static Task<Solution?> GetDocumentFixesAsync<TFixAllContext>( 47Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 51private static Task<Solution?> GetProjectFixesAsync<TFixAllContext>( 53Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 57private static Task<Solution?> GetSolutionFixesAsync<TFixAllContext>( 59Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 62var solution = fixAllContext.Solution;
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (7)
25public static async Task<Solution?> FixAllContextsAsync<TFixAllContext>( 35var solution = originalFixAllContext.Solution; 44var currentSolution = solution; 55private static async Task<Solution> FixSingleContextAsync<TFixAllContext>( 56Solution currentSolution, 76private static async Task<Solution> CleanupAndApplyChangesAsync( 78Solution currentSolution,
CodeFixesAndRefactorings\IFixAllContext.cs (1)
20Solution Solution { get; }
CodeFixesAndRefactorings\IFixAllState.cs (1)
24Solution Solution { get; }
CodeGenerationContext.cs (1)
15Solution Solution,
CodeGenerator.cs (1)
92public static bool CanAdd(Solution solution, ISymbol destination, CancellationToken cancellationToken)
CodeRefactorings\FixAllOccurences\DocumentBasedFixAllProvider.cs (2)
56/// or changes to the <see cref="Project"/> or <see cref="Solution"/> it points at will be considered. 75private Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalFixAllContext, ImmutableArray<FixAllContext> fixAllContexts)
CodeRefactorings\FixAllOccurences\FixAllContext.cs (1)
63public Solution Solution => Project.Solution;
CodeRefactorings\FixAllOccurences\FixAllProvider.cs (2)
56/// of it (like attributes), or changes to the <see cref="Project"/> or <see cref="Solution"/> it points at 70/// of it (like attributes), or changes to the <see cref="Project"/> or <see cref="Solution"/> it points at
CustomCodeActions.cs (3)
68private readonly Func<CancellationToken, Task<Solution>> _createChangedSolution; 72Func<CancellationToken, Task<Solution>> createChangedSolution, 79protected sealed override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
Diagnostics\DiagnosticData.cs (1)
214public static DiagnosticData Create(Solution solution, Diagnostic diagnostic, Project? project)
DocumentExtensions.cs (1)
200var solution = document.Project.Solution;
Editing\SolutionEditor.cs (7)
18private readonly Solution _solution; 21public SolutionEditor(Solution solution) 27/// The <see cref="Solution"/> that was specified when the <see cref="SolutionEditor"/> was constructed. 29public Solution OriginalSolution => _solution; 46/// Returns the changed <see cref="Solution"/>. 48public Solution GetChangedSolution() 50var changedSolution = _solution;
Editing\SymbolEditor.cs (7)
22private readonly Solution _originalSolution; 23private Solution _currentSolution; 25private SymbolEditor(Solution solution) 34public static SymbolEditor Create(Solution solution) 60public Solution OriginalSolution => _originalSolution; 65public Solution ChangedSolution => _currentSolution; 146private static async Task<ISymbol> GetSymbolAsync(Solution solution, ProjectId projectId, string symbolId, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\Api\IUnitTestingIncrementalAnalyzerImplementation.cs (1)
15Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken);
ExternalAccess\UnitTesting\Api\UnitTestingSolutionExtensions.cs (2)
13public static int GetWorkspaceVersion(this Solution solution) 16public static async Task<UnitTestingChecksumWrapper> GetChecksumAsync(this Solution solution, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\UnitTestingIncrementalAnalyzer.cs (1)
43public Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken)
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (2)
40var solution = project.Solution; 156Solution solution, IList<SerializableSymbolAndProjectId> array, CancellationToken cancellationToken)
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (4)
28Solution solution, string name, bool ignoreCase, SymbolFilter criteria, CancellationToken cancellationToken) 104Solution solution, string pattern, SymbolFilter criteria, CancellationToken cancellationToken) 178Solution solution, string name, bool ignoreCase, SymbolFilter criteria, CancellationToken cancellationToken) 240Solution solution, string pattern, SymbolFilter criteria, CancellationToken cancellationToken)
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (2)
28private readonly Solution _solution; 38Solution solution,
FindSymbols\FindReferences\BaseTypeFinder.cs (1)
19ISymbol symbol, Solution solution, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentProjectsFinder.cs (6)
27Solution solution, ImmutableArray<ISymbol> symbols, IImmutableSet<Project> projects, CancellationToken cancellationToken) 58Solution solution, ImmutableArray<ISymbol> symbols, CancellationToken cancellationToken) 89Solution solution, ImmutableArray<ISymbol> symbols, CancellationToken cancellationToken) 111Solution solution, 137Solution solution, Project? sourceProject, HashSet<(Project project, bool hasInternalsAccess)> dependentProjects, CancellationToken cancellationToken) 210Solution solution,
FindSymbols\FindReferences\DependentTypeFinder.cs (5)
62Solution solution, 400Solution solution, 448Solution solution, 462Solution solution, IEnumerable<Project> projectsToExamine) 479Solution solution,
FindSymbols\FindReferences\DependentTypeFinder_DerivedClasses.cs (1)
17Solution solution,
FindSymbols\FindReferences\DependentTypeFinder_DerivedInterfaces.cs (1)
18Solution solution,
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
16Solution solution,
FindSymbols\FindReferences\DependentTypeFinder_Remote.cs (3)
21Solution solution, 55Solution solution, 83private static async Task<ImmutableArray<INamedTypeSymbol>> RehydrateAsync(Solution solution, ImmutableArray<SerializableSymbolAndProjectId> values, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (3)
31ISymbol symbol, Solution solution, FindReferencesSearchOptions options, CancellationToken cancellationToken); 872ISymbol symbol, Solution solution, FindReferencesSearchOptions options, CancellationToken cancellationToken) 885TSymbol symbol, Solution solution, FindReferencesSearchOptions options, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\EventSymbolReferenceFinder.cs (1)
20Solution solution,
FindSymbols\FindReferences\Finders\FieldSymbolReferenceFinder.cs (1)
20Solution solution,
FindSymbols\FindReferences\Finders\IReferenceFinder.cs (1)
38ISymbol symbol, Solution solution, FindReferencesSearchOptions options, CancellationToken cancellationToken);
FindSymbols\FindReferences\Finders\MethodTypeParameterSymbolReferenceFinder.cs (1)
20Solution solution,
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
29Solution solution,
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (1)
23Solution solution,
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (2)
50Solution solution, 85Solution solution,
FindSymbols\FindReferences\Finders\PropertyAccessorSymbolReferenceFinder.cs (1)
22Solution solution,
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
26Solution solution,
FindSymbols\FindReferences\FindReferencesDocumentState.cs (1)
21public readonly Solution Solution;
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (2)
25private readonly Solution _solution; 47Solution solution,
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (8)
38protected Solution Solution => Engine._solution; 65var solution = engine._solution; 94Solution solution, MetadataUnifyingSymbolHashSet symbols, CancellationToken cancellationToken) 104Solution solution, ISymbol symbol, CancellationToken cancellationToken) 168var solution = engine._solution; 190var solution = engine._solution; 235var solution = engine._solution; 269var solution = engine._solution;
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (2)
128var solution = document.Project.Solution; 136var solution = document.Project.Solution;
FindSymbols\SymbolFinder.cs (3)
122ISymbol? symbol, Solution solution, CancellationToken cancellationToken = default) 147Solution solution, 254ISymbol symbol, Solution solution, CancellationToken cancellationToken)
FindSymbols\SymbolFinder.FindLiteralsServerCallback.cs (2)
17private readonly Solution _solution; 21Solution solution,
FindSymbols\SymbolFinder.FindReferencesServerCallback.cs (2)
25private readonly Solution _solution; 33Solution solution,
FindSymbols\SymbolFinder_Callers.cs (3)
24ISymbol symbol, Solution solution, CancellationToken cancellationToken = default) 33ISymbol symbol, Solution solution, IImmutableSet<Document>? documents, CancellationToken cancellationToken = default) 76Solution solution,
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (3)
28public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, Func<string, bool> predicate, CancellationToken cancellationToken = default) 34public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken = default) 44Solution solution, SearchQuery query, SymbolFilter filter, CancellationToken cancellationToken)
FindSymbols\SymbolFinder_Declarations_SourceDeclarations.cs (4)
20public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, string name, bool ignoreCase, CancellationToken cancellationToken = default) 27Solution solution, string name, bool ignoreCase, SymbolFilter filter, CancellationToken cancellationToken = default) 67public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsWithPatternAsync(Solution solution, string pattern, CancellationToken cancellationToken = default) 78Solution solution, string pattern, SymbolFilter filter, CancellationToken cancellationToken = default)
FindSymbols\SymbolFinder_FindLiteralReferences.cs (2)
18Solution solution, 46object value, Solution solution,
FindSymbols\SymbolFinder_FindReferences_Current.cs (3)
23Solution solution, 72Solution solution, 87Solution solution,
FindSymbols\SymbolFinder_FindReferences_Legacy.cs (6)
27Solution solution, 40Solution solution, 60Solution solution, 82Solution solution, 98Solution solution, 117Solution solution,
FindSymbols\SymbolFinder_FindRenamableReferences.cs (1)
17Solution solution,
FindSymbols\SymbolFinder_Helpers.cs (5)
34Solution solution, 75Solution solution, 132Solution solution, 144Solution solution, 181Solution solution,
FindSymbols\SymbolFinder_Hierarchy.cs (21)
27ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 37ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 68internal static async Task<bool> IsOverrideAsync(Solution solution, ISymbol member, ISymbol symbol, CancellationToken cancellationToken) 83ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 92ISymbol symbol, Solution solution, CancellationToken cancellationToken) 105Solution solution, 194/// "derived", but can be found with <see cref="FindImplementationsAsync(ISymbol, Solution, 204INamedTypeSymbol type, Solution solution, IImmutableSet<Project>? projects, CancellationToken cancellationToken) 211/// "derived", but can be found with <see cref="FindImplementationsAsync(ISymbol, Solution, 222INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 234/// <inheritdoc cref="FindDerivedClassesArrayAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/> 237INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 258INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 270/// <inheritdoc cref="FindDerivedInterfacesAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/> 273INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 294INamedTypeSymbol type, Solution solution, bool transitive = true, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 306/// <inheritdoc cref="FindImplementationsAsync(INamedTypeSymbol, Solution, bool, IImmutableSet{Project}, CancellationToken)"/> 309INamedTypeSymbol type, Solution solution, bool transitive, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 323ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default) 342/// <inheritdoc cref="FindImplementationsAsync(ISymbol, Solution, IImmutableSet{Project}, CancellationToken)"/> 347ISymbol symbol, Solution solution, IImmutableSet<Project>? projects = null, CancellationToken cancellationToken = default)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (2)
103Solution solution, 225Solution solution,
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
38var solution = project.Solution;
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
83var solution = project.Solution; 121var solution = _workspace.CurrentSolution;
ICodeGenerationService.cs (3)
179bool CanAddTo(ISymbol destination, Solution solution, CancellationToken cancellationToken); 184bool CanAddTo(SyntaxNode destination, Solution solution, CancellationToken cancellationToken); 192Task<SyntaxNode?> FindMostRelevantNameSpaceOrTypeDeclarationAsync(Solution solution, INamespaceOrTypeSymbol namespaceOrType, Location? location, CancellationToken cancellationToken);
ISolutionExtensions.cs (11)
14public static IEnumerable<DocumentId> GetChangedDocuments(this Solution? newSolution, Solution oldSolution) 30public static TextDocument? GetTextDocument(this Solution solution, DocumentId? documentId) 33public static Document GetRequiredDocument(this Solution solution, SyntaxTree syntaxTree) 36public static Project GetRequiredProject(this Solution solution, ProjectId projectId) 47public static Document GetRequiredDocument(this Solution solution, DocumentId documentId) 51public static async Task<Document> GetRequiredDocumentAsync(this Solution solution, DocumentId documentId, bool includeSourceGenerated = false, CancellationToken cancellationToken = default) 54public static async Task<TextDocument> GetRequiredTextDocumentAsync(this Solution solution, DocumentId documentId, CancellationToken cancellationToken = default) 58public static TextDocument GetRequiredAdditionalDocument(this Solution solution, DocumentId documentId) 61public static TextDocument GetRequiredAnalyzerConfigDocument(this Solution solution, DocumentId documentId) 64public static TextDocument GetRequiredTextDocument(this Solution solution, DocumentId documentId)
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (5)
22private readonly Solution _oldSolution; 23private readonly Solution _newSolution; 26public LinkedFileDiffMergingSession(Solution oldSolution, Solution newSolution, SolutionChanges solutionChanges) 44var updatedSolution = _newSolution;
LinkedFileDiffMerging\LinkedFileMergeSessionResult.cs (2)
14public Solution MergedSolution { get; } 19public LinkedFileMergeSessionResult(Solution mergedSolution, IEnumerable<LinkedFileMergeResult> fileMergeResults)
Options\ILegacyWorkspaceOptionService.cs (1)
13/// <see cref="Workspace.Options"/> and <see cref="Solution.Options"/>.
Options\LegacyWorkspaceOptionService.cs (2)
56/// Sets values of options that may be stored in <see cref="Solution.Options"/> (public options). 58/// <see cref="Solution.Options"/> are queried for the options new values are fetched from
Options\SolutionOptionSet.cs (1)
14/// Implements in-proc only storage for <see cref="Solution.Options"/>.
Packaging\IPackageInstallerService.cs (1)
30ImmutableArray<Project> GetProjectsWithInstalledPackage(Solution solution, string packageName, string version);
ParsedDocument.cs (1)
23/// In general, any feature API that accepts <see cref="ParsedDocument"/> should be synchronous and not access <see cref="Document"/> or <see cref="Solution"/> snapshots.
Recommendations\Recommender.cs (1)
26var solution = workspace.CurrentSolution;
Remote\IRemoteKeepAliveService.cs (3)
19/// same <see cref="Solution"/> snapshot alive on the OOP side, computed attached values (like <see 29private RemoteKeepAliveSession(Solution solution, IAsynchronousOperationListener listener) 76Solution solution,
Remote\RemoteArguments.cs (6)
66Solution solution, ISymbol symbol, CancellationToken cancellationToken) 78ISymbol symbol, Solution solution, CancellationToken cancellationToken, 106Solution solution, CancellationToken cancellationToken) 190Solution solution, CancellationToken cancellationToken) 207Solution solution, CancellationToken cancellationToken) 257public static SerializableSymbolGroup Dehydrate(Solution solution, SymbolGroup group, CancellationToken cancellationToken)
Remote\RemoteHostClient.cs (10)
108Solution solution, 118Solution solution, 130/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, CancellationToken, ValueTask}, CancellationToken)"/> 146/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, CancellationToken, ValueTask}, CancellationToken)"/> 164Solution solution, 175Solution solution, 188/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, RemoteServiceCallbackId, CancellationToken, ValueTask}, object, CancellationToken)"/> 205/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, RemoteServiceCallbackId, CancellationToken, ValueTask}, object, CancellationToken)"/> 224Solution solution1, 225Solution solution2,
Remote\RemoteServiceConnection.cs (6)
46Solution solution, 51Solution solution, 70Solution solution, 75Solution solution, 94Solution solution1, 95Solution solution2,
Remote\RemoteUtilities.cs (5)
24Solution oldSolution, 25Solution newSolution, 49public static async Task<Solution> UpdateSolutionAsync( 50Solution oldSolution, ImmutableArray<(DocumentId, ImmutableArray<TextChange>)> documentTextChanges, CancellationToken cancellationToken) 52var currentSolution = oldSolution;
Rename\ConflictEngine\ConflictResolver.cs (4)
63var solution = lightweightRenameLocations.Solution; 154private static bool IsIdentifierValid_Worker(Solution solution, string replacementText, IEnumerable<ProjectId> projectIds) 347Solution solution, 403private static async Task<Location?> GetSymbolLocationAsync(Solution solution, ISymbol symbol, CancellationToken cancellationToken)
Rename\ConflictEngine\ConflictResolver.Session.cs (7)
100var baseSolution = _renameLocationSet.Solution; 114var intermediateSolution = conflictResolution.OldSolution; 516var solution = conflictResolution.CurrentSolution; 702var solution = _renameLocationSet.Solution; 769private async Task<Solution> AnnotateAndRename_WorkerAsync( 770Solution originalSolution, 771Solution partiallyRenamedSolution,
Rename\ConflictEngine\MutableConflictResolution.cs (6)
32public readonly Solution OldSolution; 48public Solution CurrentSolution { get; private set; } 53Solution oldSolution, 72internal void UpdateCurrentSolution(Solution solution) 75internal async Task<Solution> RemoveAllRenameAnnotationsAsync( 76Solution intermediateSolution,
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
153internal async Task<Solution> SimplifyAsync(Solution solution, IEnumerable<DocumentId> documentIds, bool replacementTextValid, AnnotationTable<RenameAnnotation> renameAnnotations, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken)
Rename\ConflictResolution.cs (5)
30private readonly Solution? _newSolutionWithoutRenamedDocument; 33public readonly Solution? OldSolution; 38public readonly Solution? NewSolution; 71Solution oldSolution, 72Solution newSolutionWithoutRenamedDocument,
Rename\IRemoteRenamerService.cs (5)
126public async ValueTask<RenameLocation> RehydrateAsync(Solution solution, CancellationToken cancellation) 155ISymbol symbol, Solution solution, CodeCleanupOptionsProvider fallbackOptions, SerializableRenameLocations serializableLocations, CancellationToken cancellationToken) 209Solution solution, CancellationToken cancellationToken) 234public async Task<ConflictResolution> RehydrateAsync(Solution oldSolution, CancellationToken cancellationToken) 241var newSolutionWithoutRenamedDocument = await RemoteUtilities.UpdateSolutionAsync(
Rename\IRenameRewriterLanguageService.cs (4)
57Solution baseSolution, 58Solution newSolution, 126public abstract Task<ImmutableArray<Location>> ComputeDeclarationConflictsAsync(string replacementText, ISymbol renamedSymbol, ISymbol renameSymbol, IEnumerable<ISymbol> referencedSymbols, Solution baseSolution, Solution newSolution, IDictionary<Location, Location> reverseMappedLocations, CancellationToken cancellationToken);
Rename\LightweightRenameLocations.cs (3)
26public readonly Solution Solution; 35Solution solution, 78ISymbol symbol, Solution solution, SymbolRenameOptions options, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken)
Rename\Renamer.cs (7)
42public static Task<Solution> RenameSymbolAsync(Solution solution, ISymbol symbol, string newName, OptionSet? optionSet, CancellationToken cancellationToken = default) 45public static async Task<Solution> RenameSymbolAsync( 46Solution solution, ISymbol symbol, SymbolRenameOptions options, string newName, CancellationToken cancellationToken = default) 151internal static Task<LightweightRenameLocations> FindRenameLocationsAsync(Solution solution, ISymbol symbol, SymbolRenameOptions options, CodeCleanupOptionsProvider fallbackOptions, CancellationToken cancellationToken) 155Solution solution, 203Solution solution,
Rename\Renamer.RenameDocumentAction.cs (1)
44internal abstract Task<Solution> GetModifiedSolutionAsync(Document document, DocumentRenameOptions options, CancellationToken cancellationToken);
Rename\Renamer.RenameDocumentActionSet.cs (11)
20/// document metadata will still be updated by calling <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)"/> 22/// To apply all actions use <see cref="UpdateSolutionAsync(Solution, CancellationToken)"/>, or use a subset 23/// of the actions by calling <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)"/>. 50/// contents rather than metadata. Document metadata will still not be updated unless <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)" /> 56/// Same as calling <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)"/> with 59public Task<Solution> UpdateSolutionAsync(Solution solution, CancellationToken cancellationToken) 71/// immediately call <see cref="UpdateSolutionAsync(Solution, ImmutableArray{RenameDocumentAction}, CancellationToken)"/> without 74public async Task<Solution> UpdateSolutionAsync(Solution solution, ImmutableArray<RenameDocumentAction> actions, CancellationToken cancellationToken) 114private Document GetDocument(Solution solution)
Rename\Renamer.RenameSymbolDocumentAction.cs (2)
38internal override async Task<Solution> GetModifiedSolutionAsync(Document document, DocumentRenameOptions options, CancellationToken cancellationToken) 40var solution = document.Project.Solution;
Rename\Renamer.SyncNamespaceDocumentAction.cs (2)
45internal override async Task<Solution> GetModifiedSolutionAsync(Document document, DocumentRenameOptions options, CancellationToken cancellationToken) 48var solution = await changeNamespaceService.TryChangeTopLevelNamespacesAsync(document, _analysis.TargetNamespace, _fallbackOptions, cancellationToken).ConfigureAwait(false);
Rename\RenameRewriterParameters.cs (2)
20internal readonly Solution OriginalSolution; 47Solution originalSolution,
Rename\RenameUtilities.cs (3)
82internal static IEnumerable<Document> GetDocumentsAffectedByRename(ISymbol symbol, Solution solution, IEnumerable<RenameLocation> renameLocations) 205ISymbol symbol, Solution solution, CancellationToken cancellationToken) 316ISymbol symbol, Solution solution, CancellationToken cancellationToken)
Rename\SymbolicRenameLocations.cs (5)
30public readonly Solution Solution; 41Solution solution, 66ISymbol symbol, Solution solution, SymbolRenameOptions options, CodeCleanupOptionsProvider cleanupOptions, CancellationToken cancellationToken) 122ISymbol symbol, Solution solution, CancellationToken cancellationToken) 134Solution solution,
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (5)
31ISymbol referencedSymbol, ISymbol originalSymbol, Solution solution, bool considerSymbolReferences, CancellationToken cancellationToken) 125ISymbol symbol, Solution solution, CancellationToken cancellationToken) 150ISymbol referencedSymbol, ISymbol originalSymbol, Solution solution, CancellationToken cancellationToken) 231internal static async Task<IEnumerable<RenameLocation>> GetRenamableReferenceLocationsAsync(ISymbol referencedSymbol, ISymbol originalSymbol, ReferenceLocation location, Solution solution, CancellationToken cancellationToken) 314Solution solution,
SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (1)
81var solution = e.NewSolution;
Shared\Extensions\CodeActionExtensions.cs (2)
15public static async Task<Solution> GetRequiredChangedSolutionAsync(this CodeAction codeAction, IProgressTracker progressTracker, CancellationToken cancellationToken) 17var solution = await codeAction.GetChangedSolutionAsync(progressTracker, cancellationToken).ConfigureAwait(false);
Shared\Extensions\IFindReferencesResultExtensions.cs (2)
110Solution solution, 120Solution solution,
Shared\Extensions\ISolutionExtensions.cs (4)
18this Solution solution, 38public static TextDocumentKind? GetDocumentKind(this Solution solution, DocumentId documentId) 41public static Solution WithTextDocumentText(this Solution solution, DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveIdentity)
Shared\Extensions\ITypeSymbolExtensions.cs (1)
33Solution solution,
SolutionCrawler\IIncrementalAnalyzer.cs (1)
15Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken);
Storage\LegacyPersistentStorageService.cs (1)
38public IPersistentStorage GetStorage(Solution solution)
Storage\SQLite\v2\SQLitePersistentStorageConstants.cs (1)
47/// Inside the DB we have a table for data corresponding to the <see cref="Solution"/>. The
SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Workspace\AdhocWorkspace.cs (1)
51public Solution AddSolution(SolutionInfo solutionInfo)
Workspace\DocumentActiveContextChangedEventArgs.cs (2)
15public Solution Solution { get; } 20public DocumentActiveContextChangedEventArgs(Solution solution, SourceTextContainer sourceTextContainer, DocumentId oldActiveContextDocumentId, DocumentId newActiveContextDocumentId)
Workspace\Host\ISupportedChangesService.cs (1)
13/// Can be acquired from <see cref="Solution.Services"/>, with <see cref="SolutionServices.GetService{ISupportedChangesService}"/>.
Workspace\Host\PersistentStorage\IPersistentStorageService.cs (1)
19IPersistentStorage GetStorage(Solution solution);
Workspace\Host\PersistentStorage\SolutionKey.cs (3)
12/// <see cref="Solution"/> without needing to have the entire <see cref="Solution"/> snapshot available. 31public static SolutionKey ToSolutionKey(Solution solution)
Workspace\IWorkspaceConfigurationService.cs (1)
31/// Options that affect behavior of workspace core APIs (<see cref="Solution"/>, <see cref="Project"/>, <see
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (10)
66private readonly Func<Solution, DocumentId, bool> _documentAlreadyInWorkspace; 69private readonly Func<Solution, DocumentId, TextLoader, Solution> _documentTextLoaderChangedAction; 73Func<Solution, DocumentId, bool> documentAlreadyInWorkspace, 76Func<Solution, DocumentId, TextLoader, Solution> documentTextLoaderChangedAction, 535Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 537Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments,
Workspace\ProjectSystem\ProjectSystemProject.cs (4)
211private void ChangeProjectProperty<T>(ref T field, T newValue, Func<Solution, Solution> updateSolution, bool logThrowAwayTelemetry = false) 305private void ChangeProjectOutputPath(ref string? field, string? newValue, Func<Solution, Solution> withNewValue)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (8)
200public void ApplyChangeToWorkspace(ProjectId projectId, Func<CodeAnalysis.Solution, CodeAnalysis.Solution> solutionTransformation) 398Constraint = "Avoid calling " + nameof(CodeAnalysis.Solution.GetProject) + " to avoid realizing all projects.")] 416var newSolution = solutionChanges.Solution.RemoveMetadataReference(projectIdToRetarget, reference) 433Constraint = "Avoid calling " + nameof(CodeAnalysis.Solution.GetProject) + " to avoid realizing all projects.")] 434private static bool CanConvertMetadataReferenceToProjectReference(Solution solution, ProjectId projectIdWithMetadataReference, ProjectId referencedProjectId) 506var newSolution = solutionChanges.Solution.RemoveProjectReference(projectIdToRetarget, convertedReference.projectReference) 641var newSolution = solutionChanges.Solution.RemoveMetadataReference(project.Id, portableExecutableReference)
Workspace\ProjectSystem\SolutionChangeAccumulator.cs (6)
23public SolutionChangeAccumulator(Solution startingSolution) 26public Solution Solution { get; private set; } 35public void UpdateSolutionForDocumentAction(Solution newSolution, WorkspaceChangeKind changeKind, IEnumerable<DocumentId> documentIds) 78/// The same as <see cref="UpdateSolutionForDocumentAction(Solution, WorkspaceChangeKind, IEnumerable{DocumentId})" /> but also records 81public void UpdateSolutionForRemovedDocumentAction(Solution solution, WorkspaceChangeKind removeDocumentChangeKind, IEnumerable<DocumentId> documentIdsRemoved) 92public void UpdateSolutionForProjectAction(ProjectId projectId, Solution newSolution)
Workspace\Solution\Document.cs (3)
446var solution = this.Project.Solution; 455var newSolution = this.Project.Solution.WithFrozenPartialCompilationIncludingSpecificDocument(this.Id, cancellationToken); 471/// Returns the options that should be applied to this document. This consists of global options from <see cref="Solution.Options"/>,
Workspace\Solution\Project.cs (4)
29private readonly Solution _solution; 36internal Project(Solution solution, ProjectState projectState) 50public Solution Solution => _solution; 325/// generated. This method exists to implement <see cref="Solution.GetDocument(SyntaxTree?)"/> and is best avoided unless you're doing something
Workspace\Solution\Solution.cs (87)
126private static readonly Func<ProjectId, Solution, Project> s_createProjectFunction = CreateProject; 127private static Project CreateProject(ProjectId projectId, Solution solution) 321public Solution AddProject(ProjectId projectId, string name, string assemblyName, string language) 327public Solution AddProject(ProjectInfo projectInfo) 341public Solution RemoveProject(ProjectId projectId) 356public Solution WithProjectAssemblyName(ProjectId projectId, string assemblyName) 377public Solution WithProjectOutputFilePath(ProjectId projectId, string? outputFilePath) 393public Solution WithProjectOutputRefFilePath(ProjectId projectId, string? outputRefFilePath) 409public Solution WithProjectCompilationOutputInfo(ProjectId projectId, in CompilationOutputInfo info) 425public Solution WithProjectDefaultNamespace(ProjectId projectId, string? defaultNamespace) 441internal Solution WithProjectChecksumAlgorithm(ProjectId projectId, SourceHashAlgorithm checksumAlgorithm) 457public Solution WithProjectName(ProjectId projectId, string name) 478public Solution WithProjectFilePath(ProjectId projectId, string? filePath) 495public Solution WithProjectCompilationOptions(ProjectId projectId, CompilationOptions options) 517public Solution WithProjectParseOptions(ProjectId projectId, ParseOptions options) 540internal Solution WithHasAllInformation(ProjectId projectId, bool hasAllInformation) 558internal Solution WithRunAnalyzers(ProjectId projectId, bool runAnalyzers) 580public Solution WithProjectDocumentsOrder(ProjectId projectId, ImmutableList<DocumentId> documentIds) 606public Solution AddProjectReference(ProjectId projectId, ProjectReference projectReference) 623public Solution AddProjectReferences(ProjectId projectId, IEnumerable<ProjectReference> projectReferences) 659public Solution RemoveProjectReference(ProjectId projectId, ProjectReference projectReference) 687public Solution WithProjectReferences(ProjectId projectId, IEnumerable<ProjectReference>? projectReferences) 714public Solution AddMetadataReference(ProjectId projectId, MetadataReference metadataReference) 730public Solution AddMetadataReferences(ProjectId projectId, IEnumerable<MetadataReference> metadataReferences) 763public Solution RemoveMetadataReference(ProjectId projectId, MetadataReference metadataReference) 789public Solution WithProjectMetadataReferences(ProjectId projectId, IEnumerable<MetadataReference> metadataReferences) 812public Solution AddAnalyzerReference(ProjectId projectId, AnalyzerReference analyzerReference) 828public Solution AddAnalyzerReferences(ProjectId projectId, IEnumerable<AnalyzerReference> analyzerReferences) 866public Solution RemoveAnalyzerReference(ProjectId projectId, AnalyzerReference analyzerReference) 892public Solution WithProjectAnalyzerReferences(ProjectId projectId, IEnumerable<AnalyzerReference> analyzerReferences) 912public Solution AddAnalyzerReference(AnalyzerReference analyzerReference) 925public Solution AddAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferences) 955public Solution RemoveAnalyzerReference(AnalyzerReference analyzerReference) 976public Solution WithAnalyzerReferences(IEnumerable<AnalyzerReference> analyzerReferences) 996public Solution AddDocument(DocumentId documentId, string name, string text, IEnumerable<string>? folders = null, string? filePath = null) 1014public Solution AddDocument(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders = null, string? filePath = null, bool isGenerated = false) 1033public Solution AddDocument(DocumentId documentId, string name, SyntaxNode syntaxRoot, IEnumerable<string>? folders = null, string? filePath = null, bool isGenerated = false, PreservationMode preservationMode = PreservationMode.PreserveValue) 1051private Solution AddDocumentImpl(ProjectState project, DocumentId documentId, string name, SourceText text, IReadOnlyList<string>? folders, string? filePath, bool isGenerated) 1065public Solution AddDocument(DocumentId documentId, string name, TextLoader loader, IEnumerable<string>? folders = null) 1090public Solution AddDocument(DocumentInfo documentInfo) 1094/// Create a new <see cref="Solution"/> instance with the corresponding <see cref="Project"/>s updated to include 1097/// <returns>A new <see cref="Solution"/> with the documents added.</returns> 1098public Solution AddDocuments(ImmutableArray<DocumentInfo> documentInfos) 1113public Solution AddAdditionalDocument(DocumentId documentId, string name, string text, IEnumerable<string>? folders = null, string? filePath = null) 1120public Solution AddAdditionalDocument(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders = null, string? filePath = null) 1141public Solution AddAdditionalDocument(DocumentInfo documentInfo) 1144public Solution AddAdditionalDocuments(ImmutableArray<DocumentInfo> documentInfos) 1159public Solution AddAnalyzerConfigDocument(DocumentId documentId, string name, SourceText text, IEnumerable<string>? folders = null, string? filePath = null) 1204public Solution AddAnalyzerConfigDocuments(ImmutableArray<DocumentInfo> documentInfos) 1218public Solution RemoveDocument(DocumentId documentId) 1227public Solution RemoveDocuments(ImmutableArray<DocumentId> documentIds) 1233private Solution RemoveDocumentsImpl(ImmutableArray<DocumentId> documentIds) 1247public Solution RemoveAdditionalDocument(DocumentId documentId) 1256public Solution RemoveAdditionalDocuments(ImmutableArray<DocumentId> documentIds) 1262private Solution RemoveAdditionalDocumentsImpl(ImmutableArray<DocumentId> documentIds) 1276public Solution RemoveAnalyzerConfigDocument(DocumentId documentId) 1285public Solution RemoveAnalyzerConfigDocuments(ImmutableArray<DocumentId> documentIds) 1291private Solution RemoveAnalyzerConfigDocumentsImpl(ImmutableArray<DocumentId> documentIds) 1305public Solution WithDocumentName(DocumentId documentId, string name) 1327public Solution WithDocumentFolders(DocumentId documentId, IEnumerable<string>? folders) 1345public Solution WithDocumentFilePath(DocumentId documentId, string filePath) 1370public Solution WithDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 1397public Solution WithAdditionalDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 1424public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 1451public Solution WithDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1478public Solution WithAdditionalDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1505public Solution WithAnalyzerConfigDocumentText(DocumentId documentId, TextAndVersion textAndVersion, PreservationMode mode = PreservationMode.PreserveValue) 1532public Solution WithDocumentSyntaxRoot(DocumentId documentId, SyntaxNode root, PreservationMode mode = PreservationMode.PreserveValue) 1555internal Solution WithDocumentContentsFrom(DocumentId documentId, DocumentState documentState) 1565public Solution WithDocumentSourceCodeKind(DocumentId documentId, SourceCodeKind sourceCodeKind) 1594public Solution WithDocumentTextLoader(DocumentId documentId, TextLoader loader, PreservationMode mode) 1621public Solution WithAdditionalDocumentTextLoader(DocumentId documentId, TextLoader loader, PreservationMode mode) 1648public Solution WithAnalyzerConfigDocumentTextLoader(DocumentId documentId, TextLoader loader, PreservationMode mode) 1679internal Solution WithFrozenPartialCompilationIncludingSpecificDocument(DocumentId documentId, CancellationToken cancellationToken) 1685internal async Task<Solution> WithMergedLinkedFileChangesAsync( 1686Solution oldSolution, 1702internal Solution WithNewWorkspace(string? workspaceKind, int workspaceVersion, SolutionServices services) 1718public Solution GetIsolatedSolution() 1727public Solution WithDocumentText(IEnumerable<DocumentId?> documentIds, SourceText text, PreservationMode mode = PreservationMode.PreserveValue) 1761var newSolution = newState != _state ? new Solution(newState) : this; 1772internal Solution WithoutFrozenSourceGeneratedDocuments() 1791internal Solution WithCachedSourceGeneratorState(ProjectId projectToUpdate, Project projectWithCachedGeneratorState) 1806public SolutionChanges GetChanges(Solution oldSolution) 1817/// Gets the set of <see cref="DocumentId"/>s in this <see cref="Solution"/> with a 1828/// Returns the options that should be applied to this solution. This is equivalent to <see cref="Workspace.Options" /> when the <see cref="Solution"/> 1841public Solution WithOptions(OptionSet options) 1854internal Solution WithOptions(SolutionOptionSet options)
Workspace\Solution\SolutionChanges.cs (5)
13private readonly Solution _newSolution; 14private readonly Solution _oldSolution; 16internal SolutionChanges(Solution newSolution, Solution oldSolution) 35var old = _oldSolution;
Workspace\Solution\SolutionState.CompilationTracker.CompilationTrackerState.cs (3)
232/// requirement that any <see cref="Compilation"/> provided to any clients of the <see cref="Solution"/> 236/// cref="Solution"/> can be queried for (for example: <see 237/// cref="Solution.GetOriginatingProject(ISymbol)"/>. If <see cref="Compilation"/>s from other <see
Workspace\Solution\SolutionState.cs (4)
243/// This implicitly also changes the value of <see cref="Solution.Workspace"/> for this solution, 1524/// Gets the set of <see cref="DocumentId"/>s in this <see cref="Solution"/> with a 1839/// generated. This method exists to implement <see cref="Solution.GetDocument(SyntaxTree?)"/> and is best avoided unless you're doing something 1929/// <inheritdoc cref="Solution.WithCachedSourceGeneratorState(ProjectId, Project)"/>
Workspace\Solution\SolutionState.SymbolToProjectId.cs (1)
15/// <inheritdoc cref="Solution.GetOriginatingProjectId"/>
Workspace\TextExtensions.cs (3)
29var solution = workspace.CurrentSolution; 65var solution = workspace.CurrentSolution; 116var solution = workspace.CurrentSolution;
Workspace\Workspace.cs (115)
33/// workspace's <see cref="TryApplyChanges(Solution)"/> method. 51private Solution _latestSolution; 60/// when they are applied to workspace via <see cref="TryApplyChanges(Solution, IProgressTracker)"/>. 113protected internal Solution CreateSolution(SolutionInfo solutionInfo) 122private Solution CreateSolution(SolutionInfo solutionInfo, SolutionOptionSet options, IReadOnlyList<AnalyzerReference> analyzerReferences) 128protected internal Solution CreateSolution(SolutionId id) 138/// after <see cref="TryApplyChanges(Solution)"/> is called. 140public Solution CurrentSolution 155protected Solution SetCurrentSolution(Solution solution) 167private protected (Solution oldSolution, Solution newSolution) SetCurrentSolutionEx(Solution solution) 174var oldSolution = this.CurrentSolution; 186/// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, Func{Solution, Solution, WorkspaceChangeKind}, ProjectId?, DocumentId?, Action{Solution, Solution}?, Action{Solution, Solution}?)"/> 188Func<Solution, Solution> transformation, 192Action<Solution, Solution>? onBeforeUpdate = null, 193Action<Solution, Solution>? onAfterUpdate = null) 220private protected (bool updated, Solution newSolution) SetCurrentSolution( 221Func<Solution, Solution> transformation, 222Func<Solution, Solution, WorkspaceChangeKind> changeKind, 225Action<Solution, Solution>? onBeforeUpdate = null, 226Action<Solution, Solution>? onAfterUpdate = null) 231var newSolution = data.transformation(oldSolution); 258static Solution UnifyLinkedDocumentContents(Solution oldSolution, Solution newSolution) 289static Solution UpdateAddedDocumentToExistingContentsInSolution(Solution solution, DocumentId addedDocumentId) 301static Solution UpdateExistingDocumentsToChangedDocumentContents(Solution solution, DocumentId changedDocumentId, HashSet<DocumentId> processedDocuments) 329/// name="transformation"/> as it will have its <see cref="Solution.WorkspaceVersion"/> updated 334/// name="transformation"/> as it will have its <see cref="Solution.WorkspaceVersion"/> updated 336private protected (Solution oldSolution, Solution newSolution) SetCurrentSolution<TData>( 337Func<Solution, TData, Solution> transformation, 339Action<Solution, Solution, TData>? onBeforeUpdate = null, 340Action<Solution, Solution, TData>? onAfterUpdate = null) 344var oldSolution = Volatile.Read(ref _latestSolution); 353var newSolution = transformation(oldSolution, data); 384/// Gets or sets the set of all global options and <see cref="Solution.Options"/>. 385/// Setter also force updates the <see cref="CurrentSolution"/> to have the updated <see cref="Solution.Options"/>. 537private static Solution CheckAndAddProject(Solution newSolution, ProjectInfo project) 553var newSolution = this.CreateSolution(solutionInfo); 570var newSolution = this.CreateSolution(reloadedSolutionInfo); 888var newSolution = oldSolution; 1012Action<Solution, DocumentId> checkIsInSolution, 1013Func<Solution, DocumentId, TArg, Solution> updateSolutionWithText, 1030var newSolution = oldSolution; 1031var previousSolution = newSolution; 1195static Solution UpdateReferencesAfterAdd(Solution solution) 1252/// Determines if the specific kind of change is supported by the <see cref="TryApplyChanges(Solution)"/> method. 1274public virtual bool TryApplyChanges(Solution newSolution) 1277internal virtual bool TryApplyChanges(Solution newSolution, IProgressTracker progressTracker) 1288var oldSolution = this.CurrentSolution; 1311var solutionWithLinkedFileChangesMerged = newSolution.WithMergedLinkedFileChangesAsync(oldSolution, solutionChanges, cancellationToken: CancellationToken.None).Result; 1538/// Called during a call to <see cref="TryApplyChanges(Solution)"/> to determine if a specific change to <see cref="Project.CompilationOptions"/> is allowed. 1545/// <param name="newOptions">The new <see cref="CompilationOptions"/> of the project that was passed to <see cref="TryApplyChanges(Solution)"/>.</param> 1546/// <param name="project">The project contained in the <see cref="Solution"/> passed to <see cref="TryApplyChanges(Solution)"/>.</param> 1551/// Called during a call to <see cref="TryApplyChanges(Solution)"/> to determine if a specific change to <see cref="Project.ParseOptions"/> is allowed. 1558/// <param name="newOptions">The new <see cref="ParseOptions"/> of the project that was passed to <see cref="TryApplyChanges(Solution)"/>.</param> 1559/// <param name="project">The project contained in the <see cref="Solution"/> passed to <see cref="TryApplyChanges(Solution)"/>.</param> 1564/// This method is called during <see cref="TryApplyChanges(Solution)"/> for each project 1747private static void CheckNoChanges(Solution oldSolution, Solution newSolution) 1786/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a project to the current solution. 1797/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove a project from the current solution. 1808/// This method is called during <see cref="TryApplyChanges(Solution)"/> to change the compilation options. 1826/// This method is called during <see cref="TryApplyChanges(Solution)"/> to change the parse options. 1843/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a project reference to a project. 1854/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove a project reference from a project. 1865/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a metadata reference to a project. 1876/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove a metadata reference from a project. 1887/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add an analyzer reference to a project. 1898/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove an analyzer reference from a project. 1909/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add an analyzer reference to the solution. 1920/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove an analyzer reference from the solution. 1931/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a new document to a project. 1942/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove a document from a project. 1975/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a new additional document to a project. 1986/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove an additional document from a project. 2008/// This method is called during <see cref="TryApplyChanges(Solution)"/> to add a new analyzer config document to a project. 2019/// This method is called during <see cref="TryApplyChanges(Solution)"/> to remove an analyzer config document from a project. 2049private static void CheckSolutionIsEmpty(Solution solution) 2063private static void CheckProjectIsInSolution(Solution solution, ProjectId projectId) 2079private static void CheckProjectIsNotInSolution(Solution solution, ProjectId projectId) 2176internal static void CheckSolutionHasAnalyzerReference(Solution solution, AnalyzerReference analyzerReference) 2187internal static void CheckSolutionDoesNotHaveAnalyzerReference(Solution solution, AnalyzerReference analyzerReference) 2201private static void CheckDocumentIsInSolution(Solution solution, DocumentId documentId) 2217private static void CheckAdditionalDocumentIsInSolution(Solution solution, DocumentId documentId) 2233private static void CheckAnalyzerConfigDocumentIsInSolution(Solution solution, DocumentId documentId) 2262private static void CheckAdditionalDocumentIsNotInSolution(Solution solution, DocumentId documentId) 2278private static void CheckAnalyzerConfigDocumentIsNotInSolution(Solution solution, DocumentId documentId)
Workspace\Workspace_Editor.cs (15)
522Action<Solution, DocumentId> checkTextDocumentIsInSolution, 523Func<Solution, DocumentId, SourceText, PreservationMode, Solution> withDocumentText, 524Func<Solution, DocumentId, TextAndVersion, PreservationMode, Solution> withDocumentTextAndVersion, 651Action<Solution, DocumentId> checkTextDocumentIsInSolution, 652Func<Solution, DocumentId, TextLoader, PreservationMode, Solution> withTextDocumentTextLoader) 734private SourceText GetOpenDocumentText(Solution solution, DocumentId documentId) 747protected virtual Solution AdjustReloadedSolution(Solution oldSolution, Solution reloadedSolution) 749var newSolution = reloadedSolution; 766var oldSolution = oldProject.Solution; 767var newSolution = reloadedProject.Solution;
Workspace\Workspace_Events.cs (3)
45protected Task RaiseWorkspaceChangedEventAsync(WorkspaceChangeKind kind, Solution oldSolution, Solution newSolution, ProjectId projectId = null, DocumentId documentId = null) 231var currentSolution = this.CurrentSolution;
Workspace\WorkspaceChangeEventArgs.cs (4)
29public Solution OldSolution { get; } 36public Solution NewSolution { get; } 65public WorkspaceChangeEventArgs(WorkspaceChangeKind kind, Solution oldSolution, Solution newSolution, ProjectId? projectId = null, DocumentId? documentId = null)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
MSBuild\MSBuildWorkspace.cs (4)
174public Task<Solution> OpenSolutionAsync( 190public async Task<Solution> OpenSolutionAsync( 298public override bool TryApplyChanges(Solution newSolution) 303internal override bool TryApplyChanges(Solution newSolution, IProgressTracker progressTracker)
MSBuild\ProjectMap.cs (4)
16/// project into a custom <see cref="Workspace"/>. To use, pass <see cref="Workspace.CurrentSolution"/> to <see cref="Create(Solution)"/>. 56/// Create a <see cref="ProjectMap"/> populated with the given <see cref="Solution"/>. 58/// <param name="solution">The <see cref="Solution"/> to populate the new <see cref="ProjectMap"/> with.</param> 60public static ProjectMap Create(Solution solution)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (84)
MSBuildWorkspaceTestBase.cs (6)
61var sol = await workspace.OpenSolutionAsync(solutionFilePath); 72var sol = await workspace.OpenSolutionAsync(solutionFilePath); 83var sol = await workspace.OpenSolutionAsync(solutionFilePath); 94var sol = await workspace.OpenSolutionAsync(solutionFilePath); 125var sol = await workspace.OpenSolutionAsync(solutionFilePath); 142protected async Task<Solution> SolutionAsync(params IBuilder[] inputs)
NetCoreTests.cs (1)
388var solution = await workspace.OpenSolutionAsync(solutionFilePath);
VisualStudioMSBuildWorkspaceTests.cs (77)
57var solution = await workspace.OpenSolutionAsync(solutionFilePath); 73var solution = await workspace.OpenSolutionAsync(solutionFilePath); 98var solution = await workspace.OpenSolutionAsync(solutionFilePath); 191var solution = await workspace.OpenSolutionAsync(solutionFilePath); 203var solution = await workspace.OpenSolutionAsync(solutionFilePath); 227var sol = await workspace.OpenSolutionAsync(solutionFilePath); 242var sol = await workspace.OpenSolutionAsync(solutionFilePath); 263var solution = await workspace.OpenSolutionAsync(solutionFilePath); 281var sol = await workspace.OpenSolutionAsync(solutionFilePath); 296var sol = await workspace.OpenSolutionAsync(solutionFilePath); 319var sol = await workspace.OpenSolutionAsync(solutionFilePath); 341var solution = await SolutionAsync( 373var solution = await workspace.OpenSolutionAsync(solutionFilePath); 383var solution1 = solution.WithDocumentText(document.Id, SourceText.From("using test;")); 396var solution2 = solution1.WithProjectCompilationOptions(project.Id, project.CompilationOptions.WithOutputKind(OutputKind.NetModule)); 406var solution3 = solution2.AddProject(pid2, "foo", "foo", LanguageNames.CSharp); 572var solution = await workspace.OpenSolutionAsync(solutionFilePath); 772var solution = await workspace.OpenSolutionAsync(solutionFilePath); 790var solution = await workspace.OpenSolutionAsync(solutionFilePath); 808var solution = await workspace.OpenSolutionAsync(solutionFilePath); 826var solution = await workspace.OpenSolutionAsync(solutionFilePath); 942var solution = await ws.OpenSolutionAsync(GetSolutionFileName(@"TestSolution.sln")); 976var solution = await workspace.OpenSolutionAsync(solutionFilePath); 994var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1007var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1036var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1066var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1079var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1094var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1156var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1642var sol = await workspace.OpenSolutionAsync(solutionFilePath); 1823var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1849var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1883var sol = await workspace.OpenSolutionAsync(solutionFilePath); 1906var sol = await workspace.OpenSolutionAsync(solutionFilePath); 1930var sol = await workspace.OpenSolutionAsync(solutionFilePath); 1953var sol = await workspace.OpenSolutionAsync(solutionFilePath); 1978var solution = await workspace.OpenSolutionAsync(solutionFilePath); 1999var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2006var solution2 = workspace.CurrentSolution; 2025var solutionB = await workspaceB.OpenSolutionAsync(solutionFilePath); 2040var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2049var solution2 = workspace.CurrentSolution; 2074var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2082var solution2 = workspace.CurrentSolution; 2101var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2106var newSolution = solution.WithDocumentText(document.Id, newText); 2111var solution2 = workspace.CurrentSolution; 2127var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2133var newSolution = solution.WithAdditionalDocumentText(document.Id, newText); 2138var solution2 = workspace.CurrentSolution; 2155var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2159var newSolution = solution.AddDocument(newDocId, "Bar.cs", newText); 2164var solution2 = workspace.CurrentSolution; 2217var originalSolution = workspace.CurrentSolution; 2247var originalSolution = workspace.CurrentSolution; 2415var sol = await workspace.OpenSolutionAsync(fullPath); 2434var sol = await workspace.OpenSolutionAsync(fullPath); 2484var sol = await workspace.OpenSolutionAsync(fullPath); 2499var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2515var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2533var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2551var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2628var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2643var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2660var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2666var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2672var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2690var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2716var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2877var noEncodingSolution = noEncodingDoc.Project.Solution; 2899var solution = await workspace.OpenSolutionAsync(solutionFilePath); 2927var solution = await workspace.OpenSolutionAsync(solutionFilePath); 3004var solution = await workspace.OpenSolutionAsync(solutionFilePath); 3105var solution = await workspace.OpenSolutionAsync(solutionFilePath); 3147var solution = await workspace.OpenSolutionAsync(fullPath); 3210var solution = await workspace.OpenSolutionAsync(solutionFilePath);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (26)
SolutionUtilities.cs (19)
17public static ProjectChanges GetSingleChangedProjectChanges(Solution oldSolution, Solution newSolution) 33private static IEnumerable<ProjectChanges> GetChangedProjectChanges(Solution oldSolution, Solution newSolution) 39public static Document GetSingleChangedDocument(Solution oldSolution, Solution newSolution) 47public static TextDocument GetSingleChangedAdditionalDocument(Solution oldSolution, Solution newSolution) 55public static IEnumerable<DocumentId> GetChangedDocuments(Solution oldSolution, Solution newSolution) 67public static Document GetSingleAddedDocument(Solution oldSolution, Solution newSolution) 75public static IEnumerable<DocumentId> GetTextChangedDocuments(Solution oldSolution, Solution newSolution) 87public static IEnumerable<DocumentId> GetAddedDocuments(Solution oldSolution, Solution newSolution) 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 (7)
18var oldSolution = workspace.CurrentSolution; 19var newSolution = oldSolution.AddDocument(id, name, initialText, folders).GetDocument(id)!.WithSourceCodeKind(sourceCodeKind).Project.Solution; 26var oldSolution = workspace.CurrentSolution; 27var newSolution = oldSolution.RemoveDocument(documentId); 33var oldSolution = workspace.CurrentSolution; 34var newSolution = oldSolution.WithDocumentText(documentId, newText); 54public static IEnumerable<Project> GetProjectsByName(this Solution solution, string name)
Microsoft.CodeAnalysis.Workspaces.UnitTests (331)
CodeCleanup\AddMissingTokensTests.cs (1)
2729var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\CodeCleanupTests.cs (1)
421var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\FixIncorrectTokenTests.cs (1)
754var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\NormalizeModifiersOrOperatorsTests.cs (1)
1030var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\ReduceTokenTests.cs (1)
2018var solution = new AdhocWorkspace().CurrentSolution;
CodeCleanup\RemoveUnnecessaryLineContinuationTests.cs (1)
1388var solution = new AdhocWorkspace().CurrentSolution;
FindAllDeclarationsTests.cs (19)
133var solution = workspace.CurrentSolution; 156var solution = workspace.CurrentSolution; 365using var workspace = CreateWorkspaceWithSolution(workspaceKind, out var solution); 375var declarations = await SymbolFinder.FindSourceDeclarationsAsync((Solution)null, "Test", true); 384using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 394using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 483using var workspace = CreateWorkspaceWithSolution(workspaceKind, out var solution); 491using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 499using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 509await SymbolFinder.FindSourceDeclarationsAsync((Solution)null, str => str.Contains("Test")); 518using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 528using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 614using var workspace = CreateWorkspaceWithSolution(workspaceKind, out var solution); 627using var workspace = CreateWorkspaceWithSolution(workspaceKind, out var solution); 637await SymbolFinder.FindSourceDeclarationsWithPatternAsync((Solution)null, "test"); 646using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 656using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 666using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 699var solution = workspace.CurrentSolution
FindAllDeclarationsTests.TestSolutionsAndProject.cs (4)
91private Workspace CreateWorkspaceWithSingleProjectSolution(TestHost testHost, string[] sourceTexts, out Solution solution) 108private Workspace CreateWorkspaceWithMultipleProjectSolution(TestHost testHost, string[] sourceTexts, out Solution solution) 125private Workspace CreateWorkspaceWithSolution(SolutionKind solutionKind, out Solution solution, TestHost testHost = TestHost.InProcess) 142var workspace = CreateWorkspaceWithSolution(solutionKind, out var solution, testHost);
FindReferencesTests.cs (18)
26private static Solution AddProjectWithMetadataReferences(Solution solution, string projectName, string languageName, string code, MetadataReference metadataReference, params ProjectId[] projectReferences) 42private static Solution GetSingleDocumentSolution(Workspace workspace, string sourceText, string languageName = LanguageNames.CSharp) 52private static Solution GetMultipleDocumentSolution(Workspace workspace, string[] sourceTexts) 56var solution = workspace.CurrentSolution 85var solution = GetSingleDocumentSolution(workspace, text); 105var solution = workspace.CurrentSolution 155var sln = CreateWorkspace().CurrentSolution 194var sln = CreateWorkspace().CurrentSolution 258var sln = CreateWorkspace().CurrentSolution 305var solution = GetSingleDocumentSolution(workspace, text); 346var solution = CreateWorkspace().CurrentSolution; 418var solution = GetMultipleDocumentSolution(workspace, new[] { implText, interface1Text, interface2Text }); 439var solution = CreateWorkspace().CurrentSolution; 498var solution = GetSingleDocumentSolution(workspace, text); 525var solution = GetSingleDocumentSolution(workspace, text); 558var solution = GetSingleDocumentSolution(workspace, text, LanguageNames.VisualBasic); 600var solution = GetSingleDocumentSolution(workspace, text, LanguageNames.CSharp);
Formatter\FormatterTests.cs (1)
128var solutionWithUpdatedOptions = workspace.CurrentSolution.WithOptions(updatedSolutionOptions);
LinkedFileDiffMerging\LinkedFileDiffMergingTests.cs (4)
20var solution = workspace.CurrentSolution; 37var startingSolution = solution; 38var updatedSolution = solution; 50var mergedSolution = updatedSolution.WithMergedLinkedFileChangesAsync(startingSolution).Result;
SemanticModelReuse\SemanticModelReuseTests.cs (1)
24var solution = new AdhocWorkspace().CurrentSolution;
SerializationTests.cs (1)
30var solution = new AdhocWorkspace().CurrentSolution
Simplifier\SimplifierTests.cs (1)
92var solutionWithUpdatedOptions = workspace.CurrentSolution.WithOptions(updatedOptions);
SolutionTests\ProjectDependencyGraphTests.cs (35)
37var solution = CreateSolutionFromReferenceMap("A"); 54private static void VerifyTopologicalSort(Solution solution, params string[] expectedResults) 80var solution = CreateSolutionFromReferenceMap("A"); 89private static void VerifyDependencySets(Solution solution, string expectedResult) 116var solution = CreateSolutionFromReferenceMap(""); 131var solution = CreateSolutionFromReferenceMap("A B C D"); 168var solution = CreateSolutionFromReferenceMap("A:B B:C C D:E E:F F"); 188var solution = CreateSolutionFromReferenceMap("A:B B:C C"); 216var solution = CreateSolutionFromReferenceMap("A B C:D D"); 244var solution = CreateSolution(); 270var solution = CreateSolutionFromReferenceMap("A B:C C D:E E"); 279private static void VerifyDirectReferences(Solution solution, string project, string[] expectedResults) 291private static void VerifyTransitiveReferences(Solution solution, string project, string[] expectedResults) 297private static void VerifyTransitiveReferences(Solution solution, ProjectDependencyGraph projectDependencyGraph, string project, string[] expectedResults) 313var solution = CreateSolutionFromReferenceMap("A:B B"); 339var solution = CreateSolutionFromReferenceMap(""); 354var solution = CreateSolutionFromReferenceMap("A B C D"); 391var solution = CreateSolutionFromReferenceMap("A:B B C:D D"); 412var solution = CreateSolutionFromReferenceMap("A:B B:C C:D D"); 434var solution = CreateSolutionFromReferenceMap("A:B B:C C:D D"); 456var solution = CreateSolutionFromReferenceMap("A:B B:C C:D D"); 478var solution = CreateSolutionFromReferenceMap("A:B B:C C:D D"); 503var solution = CreateSolutionFromReferenceMap("A:B,D B:C C D"); 531var solution = CreateSolutionFromReferenceMap("A:B B:C C D:E E"); 560var solution = CreateSolutionFromReferenceMap("A:B,D B:C C D"); 591var solution = CreateSolutionFromReferenceMap("A:B B:C,C C:D D"); 648private static void VerifyDirectReverseReferences(Solution solution, string project, string[] expectedResults) 660private static void VerifyReverseTransitiveReferences(Solution solution, string project, string[] expectedResults) 677private static Solution CreateSolutionFromReferenceMap(string projectReferences) 679var solution = CreateSolution(); 713private static Solution AddProject(Solution solution, string projectName) 719private static Solution AddProjectReferences(Solution solution, string projectName, IEnumerable<string> projectReferences) 740private static Solution CreateSolution()
SolutionTests\SolutionTests.cs (212)
113var solution = workspace.CurrentSolution; 122var solution = workspace.CurrentSolution; 132var solution = workspace.CurrentSolution; 141var solution = workspace.CurrentSolution; 151var solution = workspace.CurrentSolution; 160var solution = workspace.CurrentSolution; 170var solution = workspace.CurrentSolution; 174var newSolution1 = solution.WithDocumentName(documentId, name); 177var newSolution2 = newSolution1.WithDocumentName(documentId, name); 190var solution = workspace.CurrentSolution; 194var newSolution1 = solution.WithDocumentFolders(documentId, folders); 197var newSolution2 = newSolution1.WithDocumentFolders(documentId, folders); 201var newSolution3 = solution.WithDocumentFolders(documentId, new string[0]); 204var newSolution4 = solution.WithDocumentFolders(documentId, ImmutableArray<string>.Empty); 207var newSolution5 = solution.WithDocumentFolders(documentId, null); 221var solution = workspace.CurrentSolution; 225var newSolution1 = solution.WithDocumentFilePath(documentId, path); 229var newSolution2 = newSolution1.WithDocumentFilePath(documentId, path); 233var newSolution3 = solution.WithDocumentFilePath(documentId, ""); 248var solution = workspace.CurrentSolution; 253var newSolution1 = solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Script); 266var solution = workspace.CurrentSolution; 269var newSolution = solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Interactive); 277var solution = workspace.CurrentSolution; 285var newSolution1 = solution.WithDocumentSyntaxRoot(documentId, root, PreservationMode.PreserveIdentity); 292var newSolution2 = newSolution1.WithDocumentSyntaxRoot(documentId, actualRoot); 307var solution = workspace.CurrentSolution 323var solution = workspace.CurrentSolution; 328var newSolution1 = solution.WithDocumentText(documentId, text, PreservationMode.PreserveIdentity); 334var newSolution2 = newSolution1.WithDocumentText(documentId, text, PreservationMode.PreserveIdentity); 348var solution = workspace.CurrentSolution; 352var newSolution1 = solution.WithDocumentText(documentId, textAndVersion, PreservationMode.PreserveIdentity); 358var newSolution2 = newSolution1.WithDocumentText(documentId, textAndVersion, PreservationMode.PreserveIdentity); 372var solution = workspace.CurrentSolution; 376var newSolution1 = solution.WithDocumentText(new[] { documentId }, text, PreservationMode.PreserveIdentity); 380var newSolution2 = newSolution1.WithDocumentText(new[] { documentId }, text, PreservationMode.PreserveIdentity); 405var solution = workspace.CurrentSolution; 472private static Solution UpdateSolution(PreservationMode mode, TextUpdateType updateType, Solution solution, DocumentId documentId1, SourceText text, TextAndVersion textAndVersion) 493var solution = workspace.CurrentSolution; 572var solution = workspace.CurrentSolution; 658var solution = workspace.CurrentSolution; 735var solution = workspace.CurrentSolution; 806var solution = workspace.CurrentSolution; 810var newSolution1 = solution.WithAdditionalDocumentText(documentId, text, PreservationMode.PreserveIdentity); 814var newSolution2 = newSolution1.WithAdditionalDocumentText(documentId, text, PreservationMode.PreserveIdentity); 828var solution = workspace.CurrentSolution; 832var newSolution1 = solution.WithAdditionalDocumentText(documentId, textAndVersion, PreservationMode.PreserveIdentity); 838var newSolution2 = newSolution1.WithAdditionalDocumentText(documentId, textAndVersion, PreservationMode.PreserveIdentity); 852var solution = workspace.CurrentSolution; 856var newSolution1 = solution.WithAnalyzerConfigDocumentText(documentId, text, PreservationMode.PreserveIdentity); 860var newSolution2 = newSolution1.WithAnalyzerConfigDocumentText(documentId, text, PreservationMode.PreserveIdentity); 874var solution = workspace.CurrentSolution; 878var newSolution1 = solution.WithAnalyzerConfigDocumentText(documentId, textAndVersion, PreservationMode.PreserveIdentity); 884var newSolution2 = newSolution1.WithAnalyzerConfigDocumentText(documentId, textAndVersion, PreservationMode.PreserveIdentity); 898var solution = workspace.CurrentSolution; 902var newSolution1 = solution.WithDocumentTextLoader(documentId, loader, PreservationMode.PreserveIdentity); 906var newSolution2 = solution.WithDocumentTextLoader(documentId, loader, PreservationMode.PreserveIdentity); 920var solution = workspace.CurrentSolution; 924var newSolution1 = solution.WithAdditionalDocumentTextLoader(documentId, loader, PreservationMode.PreserveIdentity); 928var newSolution2 = solution.WithAdditionalDocumentTextLoader(documentId, loader, PreservationMode.PreserveIdentity); 942var solution = workspace.CurrentSolution; 946var newSolution1 = solution.WithAnalyzerConfigDocumentTextLoader(documentId, loader, PreservationMode.PreserveIdentity); 950var newSolution2 = solution.WithAnalyzerConfigDocumentTextLoader(documentId, loader, PreservationMode.PreserveIdentity); 966var solution = workspace.CurrentSolution 972var newSolution = solution.WithProjectAssemblyName(projectId, assemblyName); 988var solution = workspace.CurrentSolution 1011var solution = workspace.CurrentSolution 1034var solution = workspace.CurrentSolution 1057var solution = workspace.CurrentSolution. 1080var solution = workspace.CurrentSolution. 1116var solution = workspace.CurrentSolution 1170var solution = workspace.CurrentSolution 1193var solution = workspace.CurrentSolution 1216var solution = workspace.CurrentSolution 1233var solution = workspace.CurrentSolution 1258var solution = workspace.CurrentSolution 1346var solution = workspace.CurrentSolution; 1364var solution2 = solution.WithProjectReferences(projectId, projectRefs); 1379var solution = workspace.CurrentSolution; 1384var newSolution1 = solution.WithProjectReferences(projectId, projectRefs); 1395var solution = workspace.CurrentSolution; 1410var solution2 = solution.AddProjectReferences(projectId, EmptyEnumerable<ProjectReference>()); 1415var solution3 = solution.AddProjectReferences(projectId, e); 1437var solution = workspace.CurrentSolution; 1448var solution2 = solution.RemoveProjectReference(projectId, externalProjectRef); 1452var solution3 = solution.RemoveProjectReference(projectId, projectRef2); 1455var solution4 = solution3.RemoveProjectReference(projectId, externalProjectRef); 1472var solution = workspace.CurrentSolution; 1508var solution = workspace.CurrentSolution; 1526var solution = workspace.CurrentSolution; 1529var solution2 = solution.AddMetadataReferences(projectId, EmptyEnumerable<MetadataReference>()); 1535var solution3 = solution.AddMetadataReferences(projectId, OnceEnumerable(metadataRef1, metadataRef2)); 1551var solution = workspace.CurrentSolution; 1558var solution2 = solution.RemoveMetadataReference(projectId, metadataRef1); 1561var solution3 = solution2.RemoveMetadataReference(projectId, metadataRef2); 1578var solution = workspace.CurrentSolution; 1596var solution = workspace.CurrentSolution; 1599var solution2 = solution.AddAnalyzerReferences(projectId, EmptyEnumerable<AnalyzerReference>()); 1605var solution3 = solution.AddAnalyzerReferences(projectId, OnceEnumerable(analyzerRef1, analyzerRef2)); 1608var solution4 = solution3.AddAnalyzerReferences(projectId, new AnalyzerReference[0]); 1624var solution = workspace.CurrentSolution; 1631var solution2 = solution.RemoveAnalyzerReference(projectId, analyzerRef1); 1634var solution3 = solution2.RemoveAnalyzerReference(projectId, analyzerRef2); 1651var solution = workspace.CurrentSolution; 1665var solution = workspace.CurrentSolution; 1667var solution2 = solution.AddAnalyzerReferences(EmptyEnumerable<AnalyzerReference>()); 1673var solution3 = solution.AddAnalyzerReferences(OnceEnumerable(analyzerRef1, analyzerRef2)); 1676var solution4 = solution3.AddAnalyzerReferences(new AnalyzerReference[0]); 1691var solution = workspace.CurrentSolution; 1697var solution2 = solution.RemoveAnalyzerReference(analyzerRef1); 1700var solution3 = solution2.RemoveAnalyzerReference(analyzerRef2); 1714var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 1722var solution2 = solution.AddDocument(documentId, "name", loader, folders); 1740var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 1748var solution2 = solution.AddDocument(documentId, "name", "text", folders, filePath); 1770var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 1779var solution2 = solution.AddDocument(documentId, "name", sourceText, folders, filePath, isGenerated: true); 1799var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 1808var solution2 = solution.AddDocument(documentId, "name", root, folders, filePath); 1828var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 1839var solution2 = solution.AddDocument(documentId, "name", root, folders, filePath); 1859var solution = workspace.CurrentSolution.AddProject(projectId, "proj1", "proj1.dll", LanguageNames.CSharp). 1868var solution2 = solution.AddDocument(documentId, "name", root); 1882var solution = workspace.CurrentSolution; 1895var solution = workspace.CurrentSolution; 1907var solution = workspace.CurrentSolution; 1922var solution = workspace.CurrentSolution 1968var solution = workspace.CurrentSolution 1992var solution = workspace.CurrentSolution 2020var solution = workspace.CurrentSolution 2030var solution = workspace.CurrentSolution; 2044var solution = workspace.CurrentSolution 2065var solution = workspace.CurrentSolution 2086var solution = workspace.CurrentSolution 2105var solution = workspace.CurrentSolution 2124var solution = workspace.CurrentSolution 2139var solution = workspace.CurrentSolution 2158var solution = workspace.CurrentSolution 2175var solution = workspace.CurrentSolution 2187private static async Task ValidateSolutionAndCompilationsAsync(Solution solution) 2274var solution = workspace.CurrentSolution; 2295var solution = workspace.CurrentSolution; 2333var solution = workspace.CurrentSolution; 2342var newSolution = solution.AddAnalyzerReference(project1, analyzerReference); 2391var solution = workspace.CurrentSolution; 2409var sol = workspace.CurrentSolution; 2418var sol2 = sol.RemoveProject(pid); 2428var sol = workspace.CurrentSolution; 2440var sol2 = sol.RemoveProject(pid); 2454var sol = workspace.CurrentSolution; 2465var sol2 = sol.RemoveProject(pid); 2472var sol3 = sol2.AddProject(pid, "goo", "goo.dll", LanguageNames.CSharp); 2490var sol = workspace.CurrentSolution 2511var solution1 = workspace.CurrentSolution 2517var solution2 = solution1.WithDocumentSyntaxRoot(documentId, newRoot); 2534var sol = workspace.CurrentSolution 2545var sol2 = sol.WithDocumentSyntaxRoot(did, annotatedRoot); 2575var sol = workspace.CurrentSolution 2616var solution = workspace.CurrentSolution 2647var sol = workspace.CurrentSolution; 2688var sol = workspace.CurrentSolution 2710var sol = workspace.CurrentSolution 2731var sol = workspace.CurrentSolution 2755var sol = workspace.CurrentSolution 2777var sol = workspace.CurrentSolution 2798var sol = workspace.CurrentSolution 2818var sol = workspace.CurrentSolution 2838var sol = workspace.CurrentSolution 2858var sol = workspace.CurrentSolution 2877var sol = workspace.CurrentSolution 2887private static ObjectReference<SourceText> GetObservedText(Solution solution, DocumentId documentId, string expectedText = null) 2908var sol = workspace.CurrentSolution 2918private static ObjectReference<SourceText> GetObservedTextAsync(Solution solution, DocumentId documentId, string expectedText = null) 2940var sol = workspace.CurrentSolution 2950private static ObjectReference<SyntaxNode> GetObservedSyntaxTreeRoot(Solution solution, DocumentId documentId) 2966var sol = workspace.CurrentSolution 2976private static ObjectReference<SyntaxNode> GetObservedSyntaxTreeRootAsync(Solution solution, DocumentId documentId) 3000var sol = workspace.CurrentSolution 3030var sol = workspace.CurrentSolution 3037private static void TestRecoverableSyntaxTree(Solution sol, DocumentId did) 3081var sol = workspace.CurrentSolution 3091private static ObjectReference<Compilation> GetObservedCompilationAsync(Solution solution, ProjectId projectId) 3106var sol = workspace.CurrentSolution 3116private static ObjectReference<Compilation> GetObservedCompilation(Solution solution, ProjectId projectId) 3133var sol = workspace.CurrentSolution 3267var solution = workspace.CurrentSolution; 3319var solution = new AdhocWorkspace().CurrentSolution 3339var solution2 = solution.WithDocumentText(did3, SourceText.From(text4)); 3466var solution = project.Solution.WithDocumentText(documentToFreezeOriginal.Id, SourceText.From("class DocumentToFreeze { void M() { /*no top level change*/ } }")); 3511var solution = project.Solution.WithDocumentText(documentToFreezeOriginal.Id, SourceText.From("class DocumentToFreeze { void M() { } public void NewMethod() { } }")); 3572var frozenSolution = document.WithFrozenPartialSemantics(CancellationToken.None).Project.Solution; 3680var solution = workspace.CurrentSolution.AddProject("TestProject", "TestProject", LanguageNames.CSharp).Solution; 3793var solution = workspace.CurrentSolution; 3809var solution = workspace.CurrentSolution; 3880var solution = workspace.CurrentSolution; 3918var solution = workspace.CurrentSolution; 3955var solution = workspace.CurrentSolution; 3997var solution = workspace.CurrentSolution; 4043var solution = workspace.CurrentSolution; 4074var solution = workspace.CurrentSolution; 4125var solution = workspace.CurrentSolution; 4146var solution = workspace.CurrentSolution; 4164var solution = workspace.CurrentSolution; 4257var s0 = workspace.CurrentSolution; 4267var s1 = s0.WithOptions(options); 4271var s2 = s1.AddProject("P1", "A1", LanguageNames.VisualBasic).Solution; 4275var s4 = s2.RemoveProject(s2.Projects.Single(p => p.Name == "P1").Id); 4303var solution = workspace.CurrentSolution.AddProject(projInfo); 4332var solution = workspace.CurrentSolution; 4347var finalSolution = solutionWithSourceTextToRelease.GetObjectReference( 4386var solution = workspace.CurrentSolution
SolutionTests\SolutionWithSourceGeneratorTests.cs (6)
371var solutionWithProjects = AddProjectWithReference(workspace.CurrentSolution, analyzerReference); 385static Solution AddProjectWithReference(Solution solution, TestGeneratorReference analyzerReference) 400var solution = AddEmptyProject(workspace.CurrentSolution) 641var solution = AddEmptyProject(workspace.CurrentSolution) 769var frozenSolution = originalDocument2.WithFrozenPartialSemantics(CancellationToken.None).Project.Solution;
SyntaxNodeTests.cs (1)
87var sol = new AdhocWorkspace().CurrentSolution
SyntaxReferenceTests.cs (10)
34private static Solution AddSingleFileCSharpProject(Solution solution, string source) 44private static Solution AddSingleFileVisualBasicProject(Solution solution, string source) 58var solution = AddSingleFileCSharpProject(workspace.CurrentSolution, @" 81var solution = AddSingleFileVisualBasicProject(workspace.CurrentSolution, @" 103var solution = AddSingleFileCSharpProject(workspace.CurrentSolution, @" 126var solution = AddSingleFileVisualBasicProject(workspace.CurrentSolution, @" 149var solution = AddSingleFileCSharpProject(workspace.CurrentSolution, @" 177var solution = AddSingleFileVisualBasicProject(workspace.CurrentSolution, @"
WorkspaceServiceTests\GlobalOptionServiceTests.cs (5)
75var newSolution1 = workspace1.CurrentSolution.WithOptions(newSet); 80var oldSolution2 = workspace2.CurrentSolution; 86var newSolution2 = workspace2.CurrentSolution; 106var newSolution1 = workspace1.CurrentSolution.WithOptions(newSet); 110var oldSolution2 = workspace2.CurrentSolution;
WorkspaceTests\AdhocWorkspaceTests.cs (5)
95var solution = ws.AddSolution(sinfo); 131var solution = ws.CurrentSolution; 168var newSolution = ws.CurrentSolution.AddProject(projInfo); 203var newSolution = ws.CurrentSolution.RemoveProject(pid); 419public WorkspaceWithPartialSemantics(Solution solution)
WorkspaceTests\WorkspaceTests.cs (2)
109var newSolution = ws.CurrentSolution.WithAnalyzerReferences(new[] { new TestAnalyzerReference() }); 193var solution = workspace1.CurrentSolution;
Microsoft.VisualStudio.LanguageServices (213)
AnalyzerDependency\AnalyzerDependencyCheckingService.cs (2)
80var solution = _workspace.CurrentSolution; 114Solution solution,
CallHierarchy\CallHierarchyDetail.cs (1)
76var solution = _workspace.CurrentSolution;
CodeCleanup\AbstractCodeCleanUpFixer.cs (10)
130var solution = _workspace.CurrentSolution; 147private Task<bool> FixSolutionAsync(Solution solution, ICodeCleanUpExecutionContext context) 152Task<Solution> ApplyFixAsync(ProgressTracker progressTracker, CancellationToken cancellationToken) 163async Task<Solution> ApplyFixAsync(ProgressTracker progressTracker, CancellationToken cancellationToken) 175async Task<Solution> ApplyFixAsync(ProgressTracker progressTracker, CancellationToken cancellationToken) 203async Task<Solution> ApplyFixAsync(ProgressTracker progressTracker, CancellationToken cancellationToken) 216Func<ProgressTracker, CancellationToken, Task<Solution>> applyFixAsync, 240var solution = await applyFixAsync(progressTracker, cancellationToken).ConfigureAwait(true); 248private async Task<Solution> FixSolutionAsync( 249Solution solution,
CodeLens\CodeLensCallbackListener.cs (6)
64var solution = _workspace.CurrentSolution; 81var solution = _workspace.CurrentSolution; 107var solution = _workspace.CurrentSolution; 129var solution = _workspace.CurrentSolution; 142Solution solution, CodeLensDescriptor descriptor, CodeLensDescriptorContext descriptorContext, CancellationToken cancellationToken) 206private Task<Document?> GetDocumentAsync(Solution solution, Guid projectGuid, string filePath, CodeLensDescriptorContext descriptorContext)
CodeLens\RemoteCodeLensReferencesService.cs (7)
37public ValueTask<VersionStamp> GetProjectCodeLensVersionAsync(Solution solution, ProjectId projectId, CancellationToken cancellationToken) 43public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, int maxSearchResults, 68public async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, 89public async Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, 114public async Task<string?> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, 140Solution solution, ImmutableArray<ReferenceLocationDescriptor> descriptors, CancellationToken cancellationToken) 254private static async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsWorkerAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode,
DebuggerIntelliSense\AbstractDebuggerIntelliSenseContext.cs (2)
137var solution = document.Project.Solution; 174var forkedSolution = solution.WithDocumentText(document.Id, _projectionBuffer.CurrentSnapshot.AsText(), PreservationMode.PreserveIdentity);
DebuggerIntelliSense\DebuggerIntellisenseWorkspace.cs (1)
14public DebuggerIntelliSenseWorkspace(Solution solution)
DesignerAttribute\VisualStudioDesignerAttributeService.cs (1)
114var solution = _workspace.CurrentSolution;
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (3)
90var currentSolution = _workspace.CurrentSolution; 204static BackgroundAnalysisScope? GetBackgroundAnalysisScope(Solution solution, IGlobalOptionService globalOptions) 307var solution = _workspace.CurrentSolution;
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
87var solution = _workspace.CurrentSolution;
EditorConfigSettings\SettingsEditorControl.xaml.cs (1)
83var solution = _workspace.CurrentSolution;
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (1)
46Solution solution, DefinitionItem definitionItem, CancellationToken cancellationToken)
Implementation\AbstractEditorFactory.cs (2)
295var solution = workspace.CurrentSolution; 330var forkedSolution = projectToAddTo.Solution.AddDocument(
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (1)
211var solution = _languageService.Workspace.CurrentSolution;
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
469public ImmutableHashSet<Tuple<ProjectId, IAssemblySymbol>> GetAssemblySet(Solution solution, string languageName, CancellationToken cancellationToken) 591public ImmutableArray<ObjectListItem> GetProjectListItems(Solution solution, string languageName, uint listFlags)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_ListItems.cs (2)
25internal ImmutableHashSet<Tuple<ProjectId, IAssemblySymbol>> GetAssemblySet(Solution solution, string languageName, CancellationToken cancellationToken) 43internal ImmutableArray<ObjectListItem> GetProjectListItems(Solution solution, string languageName, uint listFlags)
Packaging\PackageInstallerServiceFactory.cs (4)
482var solution = Workspace.CurrentSolution; 522ImmutableSegmentedList<(bool solutionChanged, ProjectId? changedProject)> workQueue, Solution solution, HashSet<ProjectId> projectsToProcess) 542Solution solution, 658public ImmutableArray<Project> GetProjectsWithInstalledPackage(Solution solution, string packageName, string version)
Preview\PreviewEngine.cs (8)
30private readonly Solution _newSolution; 31private readonly Solution _oldSolution; 43public Solution FinalSolution { get; private set; } 46public PreviewEngine(IThreadingContext threadingContext, string title, string helpString, string description, string topLevelItemName, Glyph topLevelGlyph, Solution newSolution, Solution oldSolution, IComponentModel componentModel, bool showCheckBoxes = true) 58Solution newSolution, 59Solution oldSolution, 217var updatedSolution = _topLevelChange.GetUpdatedSolution(applyingChanges: false);
Preview\PreviewService.cs (3)
40public Solution PreviewChanges( 46Solution newSolution, 47Solution oldSolution,
Preview\PreviewUpdater.PreviewDialogWorkspace.cs (1)
21public PreviewDialogWorkspace(Solution solution) : base(solution)
Preview\ReferenceChange.AnalyzerReferenceChange.cs (4)
24internal override Solution AddToSolution(Solution solution) 27internal override Solution RemoveFromSolution(Solution solution)
Preview\ReferenceChange.cs (6)
36var oldSolution = projectChanges.OldProject.Solution; 37var newSolution = projectChanges.NewProject.Solution; 80internal abstract Solution AddToSolution(Solution solution); 81internal abstract Solution RemoveFromSolution(Solution solution);
Preview\ReferenceChange.MetadataReferenceChange.cs (4)
23internal override Solution AddToSolution(Solution solution) 26internal override Solution RemoveFromSolution(Solution solution)
Preview\ReferenceChange.ProjectReferenceChange.cs (4)
25internal override Solution AddToSolution(Solution solution) 28internal override Solution RemoveFromSolution(Solution solution)
Preview\TopLevelChange.cs (8)
23private readonly Solution _newSolution; 29Solution newSolution, 60public Solution GetUpdatedSolution(bool applyingChanges) 62var solution = ApplyFileChanges(_newSolution, Children.Changes.OfType<FileChange>(), applyingChanges); 71private static Solution ApplyFileChanges(Solution solution, IEnumerable<FileChange> fileChanges, bool applyingChanges) 182private static Solution ApplyReferenceChanges(Solution solution, IEnumerable<ReferenceChange> referenceChanges)
Progression\GraphBuilder.cs (14)
40private readonly Solution _solution; 42public GraphBuilder(Solution solution) 48Solution solution, IEnumerable<GraphNode> inputNodes, CancellationToken cancellationToken) 242internal static async Task<GraphNode> GetOrCreateNodeAsync(Graph graph, ISymbol symbol, Solution solution, CancellationToken cancellationToken) 296private static async Task<GraphNode> GetOrCreateNodeForParameterAsync(Graph graph, IParameterSymbol parameterSymbol, Solution solution, CancellationToken cancellationToken) 309private static async Task<GraphNode> GetOrCreateNodeForLocalVariableAsync(Graph graph, ISymbol localSymbol, Solution solution, CancellationToken cancellationToken) 318private static async Task<GraphNode> GetOrCreateNodeAssemblyAsync(Graph graph, IAssemblySymbol assemblySymbol, Solution solution, CancellationToken cancellationToken) 327private static void UpdateLabelsForNode(ISymbol symbol, Solution solution, GraphNode node) 541private static async Task<GraphNode> GetOrCreateNodeForNamespaceAsync(Graph graph, INamespaceSymbol symbol, Solution solution, CancellationToken cancellationToken) 550private static async Task<GraphNode> GetOrCreateNodeForNamedTypeAsync(Graph graph, INamedTypeSymbol namedType, Solution solution, CancellationToken cancellationToken) 603private static async Task<GraphNode> GetOrCreateNodeForMethodAsync(Graph graph, IMethodSymbol method, Solution solution, CancellationToken cancellationToken) 621private static async Task<GraphNode> GetOrCreateNodeForFieldAsync(Graph graph, IFieldSymbol field, Solution solution, CancellationToken cancellationToken) 640private static async Task<GraphNode> GetOrCreateNodeForPropertyAsync(Graph graph, IPropertySymbol property, Solution solution, CancellationToken cancellationToken) 653private static async Task<GraphNode> GetOrCreateNodeForEventAsync(Graph graph, IEventSymbol eventSymbol, Solution solution, CancellationToken cancellationToken)
Progression\GraphNavigatorExtension.cs (1)
57var solution = _workspace.CurrentSolution;
Progression\GraphNodeCreation.cs (2)
21public static async Task<GraphNodeId> CreateNodeIdAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken) 62public static async Task<GraphNode> CreateNodeAsync(this Graph graph, ISymbol symbol, Solution solution, CancellationToken cancellationToken)
Progression\GraphNodeIdCreation.cs (15)
37internal static async Task<GraphNodeId> GetIdForNamespaceAsync(INamespaceSymbol symbol, Solution solution, CancellationToken cancellationToken) 52internal static async Task<GraphNodeId> GetIdForTypeAsync(ITypeSymbol symbol, Solution solution, CancellationToken cancellationToken) 67private static async Task<IEnumerable<GraphNodeId>> GetPartialsForNamespaceAndTypeAsync(ITypeSymbol symbol, bool includeNamespace, Solution solution, CancellationToken cancellationToken, bool isInGenericArguments = false) 122private static async Task<GraphNodeId> GetPartialForTypeAsync(ITypeSymbol symbol, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken, bool isInGenericArguments = false) 154private static async Task<GraphNodeId> GetPartialForNamedTypeAsync(INamedTypeSymbol namedType, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken, bool isInGenericArguments = false) 212private static async Task<GraphNodeId> GetPartialForPointerTypeAsync(IPointerTypeSymbol pointerType, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken) 235private static async Task<GraphNodeId> GetPartialForArrayTypeAsync(IArrayTypeSymbol arrayType, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken) 256private static async Task<GraphNodeId> GetPartialForTypeParameterSymbolAsync(ITypeParameterSymbol typeParameterSymbol, GraphNodeIdName nodeName, Solution solution, CancellationToken cancellationToken) 287public static async Task<GraphNodeId> GetIdForMemberAsync(ISymbol member, Solution solution, CancellationToken cancellationToken) 390private static async Task<Uri> GetAssemblyFullPathAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken) 396private static async Task<Uri> GetAssemblyFullPathAsync(IAssemblySymbol containingAssembly, Solution solution, CancellationToken cancellationToken) 444internal static async Task<GraphNodeId> GetIdForAssemblyAsync(IAssemblySymbol assemblySymbol, Solution solution, CancellationToken cancellationToken) 457internal static async Task<GraphNodeId> GetIdForParameterAsync(IParameterSymbol symbol, Solution solution, CancellationToken cancellationToken) 485internal static async Task<GraphNodeId> GetIdForLocalVariableAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken) 515private static async Task<int> GetLocalVariableIndexAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken)
Progression\GraphQueries\CallsGraphQuery.cs (2)
20public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken) 43ISymbol symbol, Solution solution, CancellationToken cancellationToken)
Progression\GraphQueries\ContainsChildrenGraphQuery.cs (1)
20public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\ContainsGraphQuery.cs (1)
22public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\ImplementedByGraphQuery.cs (1)
19public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\ImplementsGraphQuery.cs (1)
21public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\InheritedByGraphQuery.cs (1)
19public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\InheritsGraphQuery.cs (1)
24public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\IsCalledByGraphQuery.cs (1)
20public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
18public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\OverriddenByGraphQuery.cs (1)
18public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\OverridesGraphQuery.cs (1)
18public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueries\SearchGraphQuery.cs (1)
34public async Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken)
Progression\GraphQueryManager.cs (3)
63var solution = _workspace.CurrentSolution; 104var solution = _workspace.CurrentSolution; 115Solution solution,
Progression\IGraphQuery.cs (1)
17Task<GraphBuilder> GetGraphAsync(Solution solution, IGraphContext context, CancellationToken cancellationToken);
ProjectSystem\VisualStudioWorkspace.cs (1)
122public abstract void DisplayReferencedSymbols(Solution solution, IEnumerable<ReferencedSymbol> referencedSymbols);
ProjectSystem\VisualStudioWorkspaceImpl.AbstractAddDocumentUndoUnit.cs (1)
30var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.AbstractRemoveDocumentUndoUnit.cs (3)
28protected abstract TextDocument? GetDocument(Solution currentSolution); 32var currentSolution = Workspace.CurrentSolution; 45var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
30var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.AddProjectReferenceUndoUnit.cs (2)
30var currentSolution = Workspace.CurrentSolution; 45var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.cs (3)
51using Solution = Microsoft.CodeAnalysis.Solution; 321Microsoft.CodeAnalysis.Solution newSolution, 329var currentSolution = this.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (2)
213var solution = _workspace.CurrentSolution; 332var solution = w.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.RemoveAdditionalDocumentUndoUnit.cs (1)
25protected override TextDocument? GetDocument(Solution currentSolution)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveAnalyzerConfigDocumentUndoUnit.cs (1)
24protected override TextDocument? GetDocument(Solution currentSolution)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveDocumentUndoUnit.cs (1)
25protected override TextDocument? GetDocument(Solution currentSolution)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveMetadataReferenceUndoUnit.cs (1)
31var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.RemoveProjectReferenceUndoUnit.cs (2)
28var currentSolution = Workspace.CurrentSolution; 43var currentSolution = Workspace.CurrentSolution;
ProjectSystem\VisualStudioWorkspaceImpl.RenameDocumentUndoUnit.cs (1)
35var updatedSolution = _workspace.CurrentSolution.WithDocumentName(documentId, _toName);
PullMemberUp\MainDialog\BaseTypeTreeNodeViewModel.cs (1)
45Solution solution,
SyncNamespaces\SyncNamespacesCommandHandler.cs (3)
122var solution = _workspace.CurrentSolution; 138Solution? solution = null; 149var newSolution = previewChangeService.PreviewChanges(
TableDataSource\AbstractRoslynTableDataSource.cs (1)
24protected ImmutableArray<DocumentId> GetDocumentsWithSameFilePath(Solution solution, DocumentId documentId)
TableDataSource\AbstractTable.cs (4)
28protected abstract void AddTableSourceIfNecessary(Solution solution); 29protected abstract void RemoveTableSourceIfNecessary(Solution solution); 71private void ShutdownSourceIfNecessary(Solution solution) 81protected void AddInitialTableSource(Solution solution, ITableDataSource source)
TableDataSource\AbstractTableEntriesSnapshot.cs (1)
184var solution = workspace.CurrentSolution;
TableDataSource\Extensions.cs (1)
25var solution = workspace.CurrentSolution;
TableDataSource\MiscellaneousDiagnosticListTable.cs (2)
59protected override void AddTableSourceIfNecessary(Solution solution) 69protected override void RemoveTableSourceIfNecessary(Solution solution)
TableDataSource\OpenDocumentTracker.cs (1)
56private void StopTracking(Solution solution, ProjectId? projectId = null)
TableDataSource\Suppression\VisualStudioDiagnosticListTableCommandHandler.cs (2)
204var newSolution = await ConfigureSeverityAsync(context.UserCancellationToken).ConfigureAwait(false); 235async System.Threading.Tasks.Task<Solution> ConfigureSeverityAsync(CancellationToken cancellationToken)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (5)
161var solution = _workspace.CurrentSolution; 259var originalSolution = _workspace.CurrentSolution; 276var newSolution = _workspace.CurrentSolution; 468private static ImmutableDictionary<Document, ImmutableArray<Diagnostic>> GetDocumentDiagnosticsMappedToNewSolution(ImmutableDictionary<Document, ImmutableArray<Diagnostic>> documentDiagnosticsToFixMap, Solution newSolution, string language) 487private static ImmutableDictionary<Project, ImmutableArray<Diagnostic>> GetProjectDiagnosticsMappedToNewSolution(ImmutableDictionary<Project, ImmutableArray<Diagnostic>> projectDiagnosticsToFixMap, Solution newSolution, string language)
TableDataSource\TaskList\VisualStudioTaskListTable.cs (2)
53protected override void AddTableSourceIfNecessary(Solution solution) 63protected override void RemoveTableSourceIfNecessary(Solution solution)
TableDataSource\VisualStudioDiagnosticListTable.BuildTableDataSource.cs (1)
239var solution = item.Workspace.CurrentSolution;
TableDataSource\VisualStudioDiagnosticListTable.cs (2)
144protected override void AddTableSourceIfNecessary(Solution solution) 158protected override void RemoveTableSourceIfNecessary(Solution solution)
TaskList\ExternalErrorDiagnosticUpdateSource.cs (10)
198var solution = state.Solution; 217async ValueTask ClearErrorsCoreAsync(ProjectId projectId, Solution solution, InProgressState? state) 352var solution = inProgressState.Solution; 380private void ReportBuildErrors<T>(T item, Solution solution, ImmutableArray<DiagnosticData> buildErrors) 393private void ClearBuildOnlyProjectErrors(Solution solution, ProjectId? projectId) 411private void ClearBuildOnlyDocumentErrors(Solution solution, ProjectId? projectId, DocumentId? documentId) 539private void RaiseDiagnosticsCreated(object? id, Solution solution, ProjectId? projectId, DocumentId? documentId, ImmutableArray<DiagnosticData> items) 546private void RaiseDiagnosticsRemoved(object? id, Solution solution, ProjectId? projectId, DocumentId? documentId) 645public InProgressState(ExternalErrorDiagnosticUpdateSource owner, Solution solution, CancellationToken cancellationToken) 652public Solution Solution { get; }
UnusedReferences\Dialog\RemoveUnusedReferencesDialog.xaml.cs (1)
35public bool? ShowModal(JoinableTaskFactory joinableTaskFactory, Solution solution, string projectFilePath, ImmutableArray<ReferenceUpdate> referenceUpdates)
UnusedReferences\Dialog\UnusedReferencesTableProvider.cs (1)
62public void AddTableData(Solution solution, string projectFilePath, ImmutableArray<ReferenceUpdate> referenceUpdates)
UnusedReferences\Dialog\UnusedReferencesTableProvider.DataSource.cs (1)
33public void AddTableData(Solution solution, string projectFilePath, ImmutableArray<ReferenceUpdate> referenceUpdates)
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (5)
112Solution? solution = null; 167private (Solution?, string?, ImmutableArray<ReferenceUpdate>) GetUnusedReferencesForProjectHierarchy( 182var solution = _workspace.CurrentSolution; 189private ImmutableArray<ReferenceUpdate> GetUnusedReferencesForProject(Solution solution, string projectFilePath, string projectAssetsFile, CancellationToken cancellationToken) 205private static void ApplyUnusedReferenceUpdates(JoinableTaskFactory joinableTaskFactory, Solution solution, string projectFilePath, ImmutableArray<ReferenceUpdate> referenceUpdates, CancellationToken cancellationToken)
UnusedReferences\UnusedReferenceAnalysisService.cs (1)
26public async Task<ImmutableArray<ReferenceInfo>> GetUnusedReferencesAsync(Solution solution, string projectFilePath, string projectAssetsFilePath, ImmutableArray<ReferenceInfo> projectReferences, CancellationToken cancellationToken)
ValueTracking\ValueTrackedTreeItemViewModel.cs (3)
26private readonly Solution _solution; 47Solution solution, 92Solution solution,
ValueTracking\ValueTrackingCommandHandler.cs (1)
125var solution = document.Project.Solution;
Venus\ContainedLanguageCodeSupport.cs (1)
335var newSolution = Renamer.RenameSymbolAsync(document.Project.Solution, symbol, options, newName, cancellationToken).WaitAndGetResult_Venus(cancellationToken);
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (1)
62var solution = visualStudioWorkspace.CurrentSolution;
Workspace\VisualStudioDocumentNavigationService.cs (1)
242var solution = workspace.CurrentSolution;
Workspace\VisualStudioSymbolNavigationService.cs (1)
65var solution = project.Solution;
Workspace\VisualStudioSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs (6)
35public CodeActionOperation CreateSymbolRenamedOperation(ISymbol symbol, string newName, Solution startingSolution, Solution updatedSolution) 50private readonly Solution _startingSolution; 51private readonly Solution _updatedSolution; 57Solution startingSolution, 58Solution updatedSolution)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (46)
CodeModel\AbstractFileCodeElementTests.cs (1)
51protected Microsoft.CodeAnalysis.Solution GetCurrentSolution()
DocumentOutline\DocumentOutlineTestsBase.cs (1)
117var solution = workspace.CurrentSolution;
PersistentStorage\AbstractPersistentStorageTests.cs (43)
120var solution = CreateOrOpenSolution(nullPaths: true); 140var solution = CreateOrOpenSolution(folder); 162var solution = CreateOrOpenSolution(); 183var solution = CreateOrOpenSolution(); 206var solution = CreateOrOpenSolution(); 222var solution = CreateOrOpenSolution(); 240var solution = CreateOrOpenSolution(); 258var solution = CreateOrOpenSolution(); 273var solution = CreateOrOpenSolution(); 288var solution = CreateOrOpenSolution(); 303var solution = CreateOrOpenSolution(); 315var solution = CreateOrOpenSolution(); 328var solution = CreateOrOpenSolution(); 340var solution = CreateOrOpenSolution(); 352var solution = CreateOrOpenSolution(); 371var solution = CreateOrOpenSolution(); 390var solution = CreateOrOpenSolution(); 409var solution = CreateOrOpenSolution(); 428var solution = CreateOrOpenSolution(); 448var solution = CreateOrOpenSolution(); 468var solution = CreateOrOpenSolution(); 488var solution = CreateOrOpenSolution(); 509var solution = CreateOrOpenSolution(); 530var solution = CreateOrOpenSolution(); 551var solution = CreateOrOpenSolution(); 572var solution = CreateOrOpenSolution(); 596var solution = CreateOrOpenSolution(); 620var solution = CreateOrOpenSolution(); 644var solution = CreateOrOpenSolution(); 668var solution = CreateOrOpenSolution(); 689var solution = CreateOrOpenSolution(); 710var solution = CreateOrOpenSolution(); 731var solution = CreateOrOpenSolution(); 752var solution = CreateOrOpenSolution(); 776var solution = CreateOrOpenSolution(); 800var solution = CreateOrOpenSolution(); 824var solution = CreateOrOpenSolution(); 859var solution = CreateOrOpenSolution(); 879var solution = CreateOrOpenSolution(); 899var solution = CreateOrOpenSolution(); 980protected Solution CreateOrOpenSolution(TempDirectory? persistentFolder = null, bool nullPaths = false) 990var solution = workspace.CurrentSolution; 1008Solution solution,
PersistentStorage\SQLiteV2PersistentStorageTests.cs (1)
36var solution = CreateOrOpenSolution(nullPaths: true);
Microsoft.VisualStudio.LanguageServices.Implementation (12)
CodeModel\AbstractCodeModelService.cs (2)
498var oldSolution = workspace.CurrentSolution; 502var newSolution = _threadingContext.JoinableTaskFactory.Run(() => Renamer.RenameSymbolAsync(oldSolution, symbol, new SymbolRenameOptions(), newName));
CodeModel\CodeModelProjectCache.cs (1)
111var solution = State.Workspace.CurrentSolution;
CodeModel\Collections\OverloadsCollection.cs (1)
61var solution = this.Workspace.CurrentSolution;
CodeModel\Collections\PartialTypeCollection.cs (1)
52var solution = this.Workspace.CurrentSolution;
RoslynVisualStudioWorkspace.cs (1)
121public override void DisplayReferencedSymbols(Solution solution, IEnumerable<ReferencedSymbol> referencedSymbols)
SolutionExplorer\AnalyzersCommandHandler.cs (2)
434var originalSolution = workspace.CurrentSolution; 465var newSolution = await selectedDiagnostic.GetSolutionWithUpdatedAnalyzerConfigSeverityAsync(selectedAction.Value, project, context.UserCancellationToken).ConfigureAwait(false);
SolutionExplorer\DiagnosticItem\CpsDiagnosticItemSource.cs (1)
102private AnalyzerReference? TryGetAnalyzerReference(Solution solution)
SolutionExplorer\DiagnosticItem\DiagnosticItem.cs (1)
86internal Task<Solution> GetSolutionWithUpdatedAnalyzerConfigSeverityAsync(ReportDiagnostic value, Project project, CancellationToken cancellationToken)
SolutionExplorer\SourceGeneratedFileItems\SourceGeneratedFileItemSource.cs (2)
68private async Task UpdateSourceGeneratedFileItemsAsync(Solution solution, CancellationToken cancellationToken) 173var solution = _workspace.CurrentSolution;
Microsoft.VisualStudio.LanguageServices.LiveShare (9)
Client\RemoteDiagnosticListTable.cs (2)
55protected override void AddTableSourceIfNecessary(Solution solution) 71protected override void RemoveTableSourceIfNecessary(Solution solution)
LiveShareInitializeHandler.cs (2)
17internal class LiveShareInitializeHandler : ILspRequestHandler<InitializeParams, InitializeResult, Solution> 29public Task<InitializeResult> HandleAsync(InitializeParams param, RequestContext<Solution> requestContext, CancellationToken cancellationToken)
LSPSDKInitializeHandler.cs (2)
23internal class LSPSDKInitializeHandler : ILspRequestHandler<LSP.InitializeParams, LSP.InitializeResult, Solution> 31public Task<LSP.InitializeResult> HandleAsync(LSP.InitializeParams request, RequestContext<Solution> requestContext, CancellationToken cancellationToken)
ProjectsHandler.cs (3)
20internal class ProjectsHandler : ILspRequestHandler<object, object[], Solution> 22public async Task<object[]> HandleAsync(object param, RequestContext<Solution> requestContext, CancellationToken cancellationToken) 25var solution = requestContext.Context;
Microsoft.VisualStudio.LanguageServices.LiveShare.UnitTests (9)
AbstractLiveShareRequestHandlerTests.cs (8)
56protected static async Task<ResponseType> TestHandleAsync<RequestType, ResponseType>(Solution solution, RequestType request, string methodName) 58var requestContext = new RequestContext<Solution>(solution, new MockHostProtocolConverter(), JObject.FromObject(new ClientCapabilities())); 62protected static async Task<ResponseType> TestHandleAsync<RequestType, ResponseType>(Solution solution, RequestType request, string methodName, Func<Uri, Uri> uriMappingFunc) 64var requestContext = new RequestContext<Solution>(solution, new MockHostProtocolConverter(uriMappingFunc), JObject.FromObject(new ClientCapabilities())); 68protected static ILspRequestHandler<RequestType, ResponseType, Solution> GetHandler<RequestType, ResponseType>(Solution solution, string methodName) 72return (ILspRequestHandler<RequestType, ResponseType, Solution>)handlers.Single(handler => handler is ILspRequestHandler<RequestType, ResponseType, Solution> && IsMatchingMethod(handler, methodName));
ProjectsHandlerTests.cs (1)
26var solution = testLspServer.GetCurrentSolution();
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (2)
CodeModel\Mocks\MockVisualStudioWorkspace.vb (1)
79Public Overrides Sub DisplayReferencedSymbols(solution As Solution, referencedSymbols As IEnumerable(Of ReferencedSymbol))
ProjectSystemShim\Framework\TestEnvironment.vb (1)
109Public Overrides Sub DisplayReferencedSymbols(solution As Solution, referencedSymbols As IEnumerable(Of ReferencedSymbol))
Microsoft.VisualStudio.LanguageServices.UnitTests (8)
Diagnostics\DiagnosticTableDataSourceTests.vb (2)
765Private Shared Function CreateItem(solution As Solution, documentId As DocumentId, Optional severity As DiagnosticSeverity = DiagnosticSeverity.Error) As DiagnosticData 769Private Shared Function CreateItem(solution As Solution, projectId As ProjectId, documentId As DocumentId, Optional severity As DiagnosticSeverity = DiagnosticSeverity.Error, Optional link As String = Nothing, Optional customTags As String() = Nothing) As DiagnosticData
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (4)
682Public Function GetDiagnosticsAsync(solution As Solution, Optional projectId As ProjectId = Nothing, Optional documentId As DocumentId = Nothing, Optional includeSuppressedDiagnostics As Boolean = False, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ImmutableArray(Of DiagnosticData)) Implements IDiagnosticAnalyzerService.GetDiagnosticsAsync 686Public Function GetDiagnosticsForIdsAsync(solution As Solution, Optional projectId As ProjectId = Nothing, Optional documentId As DocumentId = Nothing, Optional diagnosticIds As ImmutableHashSet(Of String) = Nothing, Optional includeSuppressedDiagnostics As Boolean = False, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ImmutableArray(Of DiagnosticData)) Implements IDiagnosticAnalyzerService.GetDiagnosticsForIdsAsync 690Public Function GetProjectDiagnosticsForIdsAsync(solution As Solution, Optional projectId As ProjectId = Nothing, Optional diagnosticIds As ImmutableHashSet(Of String) = Nothing, Optional includeSuppressedDiagnostics As Boolean = False, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ImmutableArray(Of DiagnosticData)) Implements IDiagnosticAnalyzerService.GetProjectDiagnosticsForIdsAsync 698Public Function ForceAnalyzeAsync(solution As Solution, onProjectAnalyzed As Action(Of Project), Optional projectId As ProjectId = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task Implements IDiagnosticAnalyzerService.ForceAnalyzeAsync
Progression\ProgressionTestState.vb (2)
57Public Async Function GetGraphContextAfterQueryWithSolution(graph As Graph, solution As Solution, graphQuery As IGraphQuery, direction As GraphContextDirection) As Task(Of IGraphContext) 83Public Function GetSolution() As Solution
Microsoft.VisualStudio.LanguageServices.Xaml (9)
Features\InlineRename\XamlEditorInlineRenameService.cs (5)
142private readonly Solution _oldSolution; 144public InlineRenameLocationSet(IXamlRenameInfo renameInfo, Solution solution, ImmutableArray<InlineRenameLocation> locations) 160var newSolution = _oldSolution; 177public InlineRenameReplacementInfo(InlineRenameLocationSet inlineRenameLocationSet, Solution newSolution, string replacementText) 184public Solution NewSolution { get; }
Implementation\IXamlEditAndContinueSolutionProvider.cs (1)
16event Action<Solution>? SolutionCommitted;
Implementation\LanguageServer\Extensions\SolutionExtensions.cs (1)
17public static IEnumerable<Project> GetXamlProjects(this Solution solution)
Implementation\XamlEditAndContinueSolutionProvider.cs (2)
34public event Action<Solution>? SolutionCommitted; 44private void OnEditAndContinueSolutionCommitted(Solution solution)
Roslyn.VisualStudio.DiagnosticsWindow (1)
Panels\WorkspacePanel.xaml.cs (1)
77var solution = workspace.CurrentSolution;
Roslyn.VisualStudio.Next.UnitTests (120)
Remote\RemoteHostClientServiceFactoryTests.cs (1)
57var newSolution = document.Project.Solution.WithDocumentText(document.Id, newText, PreservationMode.PreserveIdentity);
Remote\SerializationValidator.cs (2)
101public async Task<Solution> GetSolutionAsync(SolutionAssetStorage.Scope scope) 210internal async Task VerifySolutionStateSerializationAsync(Solution solution, Checksum solutionChecksum)
Remote\SnapshotSerializationTests.cs (22)
53internal static Solution CreateFullSolution(Workspace workspace) 55var solution = workspace.CurrentSolution; 85var solution = workspace.CurrentSolution; 108var solution = workspace.CurrentSolution; 119var solution = workspace.CurrentSolution; 181var solution = workspace.CurrentSolution; 194var solution = CreateFullSolution(workspace); 220var solution = CreateFullSolution(workspace); 232var solution = CreateFullSolution(workspace); 245var solution = CreateFullSolution(workspace); 258var solution = CreateFullSolution(workspace); 300var solution = CreateFullSolution(workspace); 307var recovered = await validator.GetSolutionAsync(scope1).ConfigureAwait(false); 321var roundtrip = await validator.GetSolutionAsync(scope2).ConfigureAwait(false); 337var solution = CreateFullSolution(workspace); 344var recovered = await validator.GetSolutionAsync(scope1).ConfigureAwait(false); 359var roundtrip = await validator.GetSolutionAsync(scope2).ConfigureAwait(false); 492var recovered = await validator.GetSolutionAsync(snapshot).ConfigureAwait(false); 512var recovered = await validator.GetSolutionAsync(snapshot).ConfigureAwait(false); 525var recovered = await validator.GetSolutionAsync(snapshot).ConfigureAwait(false); 579var solution = workspace.CurrentSolution 588var recovered = await validator.GetSolutionAsync(scope);
Services\AssetProviderTests.cs (2)
72var solution = workspace.CurrentSolution; 100var solution = workspace.CurrentSolution;
Services\ServiceHubServicesTests.cs (24)
50var solution = workspace.CurrentSolution; 72var solution = workspace.CurrentSolution; 100private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, Workspace remoteWorkspace, Solution solution, Dictionary<Checksum, object> map = null) 132var solution = workspace.CurrentSolution; 178var solution = workspace.CurrentSolution.AddProject("unknown", "unknown", NoCompilationConstants.LanguageName).Solution; 212var solution = Populate(workspace.CurrentSolution); 249var solution = workspace.CurrentSolution; 324private static async Task<Solution> VerifyIncrementalUpdatesAsync( 328Solution solution, 333var remoteSolution = remoteWorkspace.CurrentSolution; 347var currentSolution = UpdateSolution(solution, projectName, documentName, csAddition, vbAddition); 372var currentRemoteSolution = remoteWorkspace.CurrentSolution; 386private static void VerifyStates(Solution solution1, Solution solution2, string projectName, ImmutableArray<string> documentNames) 422private static async Task VerifyAssetStorageAsync(InProcRemoteHostClient client, Solution solution) 431private static Solution UpdateSolution(Solution solution, string projectName, string documentName, string csAddition, string vbAddition) 448private static (Project project, Document document) GetProjectAndDocument(Solution solution, string projectName, string documentName) 456private static (Project project, ImmutableArray<Document> documents) GetProjectAndDocuments(Solution solution, string projectName, ImmutableArray<string> documentNames) 465private static async Task UpdatePrimaryWorkspace(RemoteHostClient client, Solution solution) 474private static Solution Populate(Solution solution) 539private static Solution AddProject(Solution solution, string language, string[] documents, string[] additionalDocuments, ProjectId[] p2pReferences)
Services\SolutionAssetCacheTests.cs (1)
70var solution = workspace.CurrentSolution;
Services\SolutionServiceTests.cs (68)
46var solution = workspace.CurrentSolution; 50var synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 64var solution = workspace.CurrentSolution; 68var synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch, solution.WorkspaceVersion, cancellationToken: CancellationToken.None); 90var solution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 119var solution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 139var solution = workspace.CurrentSolution; 143var first = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 144var second = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 164static Solution SetProjectProperties(Solution solution, int version) 180static void ValidateProperties(Solution solution, int version) 344var solution = workspace.CurrentSolution; 352var remoteSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 387var solution1 = workspace.CurrentSolution; 390var remoteSolution1 = await GetInitialOOPSolutionAsync(remoteWorkspace, assetProvider, solution1); 396var currentSolution = remoteSolution1.WithDocumentText(remoteSolution1.Projects.First().Documents.First().Id, SourceText.From(code + " class Test2 { }")); 406var remoteSolution3 = (await remoteWorkspace.GetTestAccessor().TryUpdateWorkspaceCurrentSolutionAsync(currentSolution, ++version)).solution; 412var solution2 = remoteWorkspace.GetTestAccessor().CreateSolutionFromInfo(solutionInfo2); 423static async Task<Solution> GetInitialOOPSolutionAsync(RemoteWorkspace remoteWorkspace, AssetProvider assetProvider, Solution solution) 433static async Task Verify(RemoteWorkspace remoteWorkspace, Solution givenSolution, Solution remoteSolution, bool expectRemoteSolutionToCurrent) 451var solution = workspace.CurrentSolution; 455var synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, workspaceVersion: 0, CancellationToken.None); 487var solution = workspace.CurrentSolution 495var synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, workspaceVersion: 0, CancellationToken.None); 501var frozenSolution1 = solution.WithFrozenSourceGeneratedDocument(documentIdentity, frozenText1).Project.Solution; 510var frozenSolution2 = solution.WithFrozenSourceGeneratedDocument(documentIdentity, frozenText2).Project.Solution; 526var solution = workspace.CurrentSolution; 536var syncedFullSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 543var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 548var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 560var solution = workspace.CurrentSolution; 574var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 581var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 587var syncedFullSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 601var solution = workspace.CurrentSolution; 615var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 622var project3SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project3Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 634var solution = workspace.CurrentSolution; 649var project3SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project3Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 655var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 662var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 675var solution = workspace.CurrentSolution; 691var project3SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project3Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 696var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 701var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 713var solution = workspace.CurrentSolution; 729var project3SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project3Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 734var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 739var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 751var solution = workspace.CurrentSolution; 765var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 772var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 784var solution = workspace.CurrentSolution; 799private static async Task VerifySolutionUpdate(string code, Func<Solution, Solution> newSolutionGetter) 807Func<Solution, Solution> newSolutionGetter, 808Action<Solution> oldSolutionValidator = null, 809Action<Solution> newSolutionValidator = null) 811var solution = workspace.CurrentSolution; 822var recoveredSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 829var newSolution = newSolutionGetter(solution); 834var recoveredNewSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, newSolutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 840var third = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, newSolutionChecksum, updatePrimaryBranch: false, workspaceVersion: -1, CancellationToken.None); 847private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, RemoteWorkspace remoteWorkspace, Solution solution, Dictionary<Checksum, object> map = null)