152 references to Workspace
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
DocumentExtensions.cs (1)
79var workspace = document.Project.Solution.Workspace;
ProjectExtensions.cs (1)
37=> project.Solution.Workspace.Services.GetExtendedLanguageServices(project.Language);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (1)
3284document.Project.Solution.Workspace.TryApplyChanges(newDoc.Project.Solution);
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
129using var workspace = (TestWorkspace)project.Solution.Workspace;
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (3)
54var workspace = (TestWorkspace)project.Solution.Workspace; 92var workspace = (TestWorkspace)project.Solution.Workspace; 133var workspace = (TestWorkspace)project.Solution.Workspace;
PdbSourceDocument\PdbSourceDocumentTests.cs (1)
865using var workspace = (TestWorkspace)project.Solution.Workspace;
Microsoft.CodeAnalysis.EditorFeatures (34)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
177document.Project.Solution.Workspace.TryApplyChanges(updatedDocument.Project.Solution);
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
240if (args.NewSolution.Workspace != _workspace)
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.PushDiagnosticsTaggerProvider.cs (1)
130var workspace = document.Project.Solution.Workspace;
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (1)
101var workspace = project.Solution.Workspace;
EditAndContinue\EditAndContinueDiagnosticAnalyzer.cs (1)
56var workspace = designTimeDocument.Project.Solution.Workspace;
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (2)
78var workspace = initialDocument.Project.Solution.Workspace; 119var workspace = solution.Workspace;
Extensibility\NavigationBar\AbstractEditorNavigationBarItemService.cs (1)
48var workspace = document.Project.Solution.Workspace;
ExternalAccess\VSTypeScript\VSTypeScriptGoToSymbolService.cs (1)
40document.Project.Solution.Workspace, cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\VSTypeScriptNavigationBarItemService.cs (1)
65var workspace = document.Project.Solution.Workspace;
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (1)
85if (!document.Project.Solution.Workspace.TryApplyChanges(result.UpdatedSolution))
GoToDefinition\AbstractGoToCommandHandler`2.cs (1)
194document.Project.Solution.Workspace,
GoToDefinition\AbstractGoToDefinitionService.cs (2)
39var workspace = solution.Workspace; 135_threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false);
GoToDefinition\GoToDefinitionHelpers.cs (1)
137threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameService.cs (2)
121document.Project.Solution.Workspace, 141var workspace = document.Project.Solution.Workspace;
InlineRename\InlineRenameSession.cs (1)
875var finalSolution = CalculateFinalSolutionSynchronously(newSolution, newSolution.Workspace, changedDocumentIDs, cancellationToken);
IntelliSense\Helpers.cs (2)
148var target = new QuickInfoHyperLink(document.Project.Solution.Workspace, absoluteUri); 159var workspace = document.Project.Solution.Workspace;
NavigateTo\NavigateToHelpers.cs (1)
38var workspace = document.Project.Solution.Workspace;
NavigationBar\NavigationBarController.cs (1)
224workspace: d.Project.Solution.Workspace,
Preview\AbstractPreviewFactoryService.cs (1)
83var ignoreUnchangeableDocuments = oldSolution.Workspace.IgnoreUnchangeableDocumentsWhenApplyingChanges;
RenameTracking\RenameTrackingCancellationCommandHandler.cs (1)
43RenameTrackingDismisser.DismissVisibleRenameTracking(document.Project.Solution.Workspace, document.Id);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
127var workspace = document.Project.Solution.Workspace;
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
244document.Project.Solution.Workspace,
Shared\Preview\PreviewWorkspace.cs (1)
28: base(solution.Workspace.Services.HostServices, WorkspaceKind.Preview)
Shared\Tagging\EventSources\TaggerEventSources.ParseOptionChangedEventSource.cs (1)
39var workspace = e.NewSolution.Workspace;
SolutionEvents\HostLegacySolutionEventsWorkspaceEventListener.cs (3)
65var workspace = events[0].OldSolution.Workspace; 66Contract.ThrowIfTrue(events.Any(e => e.OldSolution.Workspace != workspace || e.NewSolution.Workspace != workspace));
SpellCheck\RoslynSpellCheckFixerProvider.cs (1)
114var workspace = document.Project.Solution.Workspace;
Structure\AbstractStructureTaggerProvider.cs (1)
86if (openDocument.Project.Solution.Workspace is MetadataAsSourceWorkspace masWorkspace &&
TaskList\TaskListUpdatedArgs.cs (1)
25: base(id, solution.Workspace, documentId.ProjectId, documentId)
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (3)
AsyncSuggestedActionsSource.cs (1)
176var workspace = document.Project.Solution.Workspace;
FixAllGetFixesService.cs (1)
115var workspace = fixAllState.Project.Solution.Workspace;
SuggestedActionsSource.cs (1)
165var workspace = document.Project.Solution.Workspace;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Completion\AbstractCompletionProviderTests.cs (1)
510document.Project.Solution.Workspace.TryApplyChanges(newDoc.Project.Solution);
Diagnostics\GenerateType\TestGenerateTypeOptionsService.cs (1)
55DefaultNamespace ??= projectManagementService.GetDefaultNamespace(Project, Project?.Solution.Workspace);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
616var incrementalAnalyzer = (DiagnosticIncrementalAnalyzer)service.CreateIncrementalAnalyzer(project.Solution.Workspace);
Preview\PreviewWorkspaceTests.cs (2)
197incrementalAnalyzer.CreateIncrementalAnalyzer(leftDocument.Project.Solution.Workspace); 198incrementalAnalyzer.CreateIncrementalAnalyzer(rightDocument.Project.Solution.Workspace);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (7)
NavigateTo\NavigateToItemDisplay.cs (2)
117var workspace = document.Project.Solution.Workspace; 131var workspace = document.Project.Solution.Workspace;
Peek\PeekableItemFactory.cs (1)
92solution.Workspace, project.Id, symbolKey, peekResultFactory, _metadataAsSourceFileService, _globalOptions, _threadingContext));
Peek\PeekableItemSource.cs (1)
130var workspace = project.Solution.Workspace;
Suggestions\AsyncSuggestedActionsSource.cs (1)
176var workspace = document.Project.Solution.Workspace;
Suggestions\FixAll\FixAllGetFixesService.cs (1)
115var workspace = fixAllState.Project.Solution.Workspace;
Suggestions\SuggestedActionsSource.cs (1)
165var workspace = document.Project.Solution.Workspace;
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Internal\Editor\FSharpNavigationBarItemService.cs (1)
69var workspace = document.Project.Solution.Workspace;
Microsoft.CodeAnalysis.Features (1)
DocumentSpanExtensions.cs (1)
17var workspace = solution.Workspace;
Microsoft.CodeAnalysis.LanguageServer.Protocol (22)
Extensions\Extensions.cs (1)
108var documentIdInCurrentContext = solution.Workspace.GetDocumentIdInCurrentContext(documents.First().Id);
Features\Diagnostics\DefaultDiagnosticAnalyzerService.cs (2)
92Debug.Assert(textDocument.Project.Solution.Workspace == _workspace); 105Debug.Assert(document.Project.Solution.Workspace == _workspace);
Features\Diagnostics\DiagnosticAnalyzerService.cs (6)
80if (_map.TryGetValue(document.Project.Solution.Workspace, out var analyzer)) 108if (_map.TryGetValue(document.Project.Solution.Workspace, out var analyzer)) 141if (_map.TryGetValue(solution.Workspace, out var analyzer)) 151if (_map.TryGetValue(solution.Workspace, out var analyzer)) 183if (_map.TryGetValue(solution.Workspace, out var analyzer)) 194if (_map.TryGetValue(solution.Workspace, out var analyzer))
Features\Diagnostics\DiagnosticAnalyzerService_IncrementalAnalyzer.cs (1)
48=> Reanalyze(e.Solution.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(e.NewActiveContextDocumentId), highPriority: true);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (6)
167Contract.ThrowIfFalse(project.Solution.Workspace == Workspace); 171project.Solution.Workspace, 181Contract.ThrowIfFalse(solution == null || solution.Workspace == Workspace); 194Contract.ThrowIfFalse(document.Project.Solution.Workspace == Workspace); 198document.Project.Solution.Workspace, 208Contract.ThrowIfFalse(solution == null || solution.Workspace == Workspace);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (1)
210foreach (var openDocumentId in project.Solution.Workspace.GetOpenDocumentIds())
Handler\CodeActions\CodeActionHelpers.cs (2)
244document.Project.Solution.Workspace, codeFixService, document, textSpan, 249document.Project.Solution.Workspace, codeRefactoringService, document, textSpan, CodeActionRequestPriority.None, fallbackOptions, isBlocking: false,
Handler\PullHandlers\VersionedPullCache`2.cs (2)
74var workspace = project.Solution.Workspace; 122_idToLastReportedResult[(project.Solution.Workspace, projectOrDocumentId)] = (newResultId, cheapVersion, expensiveVersion);
Workspaces\LspWorkspaceManager.cs (1)
206var searchedWorkspaceKinds = string.Join(";", lspSolutions.SelectAsArray(lspSolution => lspSolution.Solution.Workspace.Kind));
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (2)
41newDocument.Project.Solution.Workspace.ApplyDocumentChanges(newDocument, cancellationToken) 45solution.Workspace, solution.GetRequiredDocument(navigationPoint.Tree).Id,
Microsoft.CodeAnalysis.Workspaces (13)
CodeActions\CodeAction.cs (1)
307originalSolution ??= changedSolution.Workspace.CurrentSolution;
DocumentExtensions.cs (1)
79var workspace = document.Project.Solution.Workspace;
Editing\SymbolEditor.cs (1)
194.Select(n => SyntaxGenerator.GetGenerator(_originalSolution.Workspace, n.Language).GetDeclaration(n))
ProjectExtensions.cs (1)
37=> project.Solution.Workspace.Services.GetExtendedLanguageServices(project.Language);
Workspace\Solution\SolutionState.cs (1)
243/// This implicitly also changes the value of <see cref="Solution.Workspace"/> for this solution,
Workspace\Workspace.cs (8)
1282if (newSolution.Workspace != this) 2069solution.Workspace.GetProjectName(projectId))); 2085solution.Workspace.GetProjectName(projectId))); 2207solution.Workspace.GetDocumentName(documentId))); 2223solution.Workspace.GetDocumentName(documentId))); 2239solution.Workspace.GetDocumentName(documentId))); 2268solution.Workspace.GetAdditionalDocumentName(documentId))); 2284solution.Workspace.GetAnalyzerConfigDocumentName(documentId)));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2809var workspace = sol.GetObjectReference(static s => s.Workspace); 2878Assert.True(noEncodingSolution.Workspace.TryApplyChanges(noEncodingSolution));
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
WorkspaceTests\AdhocWorkspaceTests.cs (2)
420: base(solution.Workspace.Services.HostServices, solution.Workspace.Kind)
Microsoft.VisualStudio.LanguageServices (26)
CallHierarchy\CallHierarchyItem.cs (1)
44_workspace = project.Solution.Workspace;
CallHierarchy\Finders\AbstractCallFinder.cs (1)
161loc => new CallHierarchyDetail(this.Provider, loc, project.Solution.Workspace)));
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
172return FixAsync(document.Project.Solution.Workspace, ApplyFixAsync, context);
DebuggerIntelliSense\DebuggerIntellisenseWorkspace.cs (1)
15: base(solution.Workspace.Services.HostServices, WorkspaceKind.Debugger)
FindReferences\Entries\DocumentSpanEntry.cs (3)
236var clonedBuffer = excerpt.Value.Content.CreateTextBufferWithRoslynContentType(document.Project.Solution.Workspace); 290var workspace = _excerptResult.Document.Project.Solution.Workspace; 307var workspace = _excerptResult.Document.Project.Solution.Workspace;
FindReferences\StreamingFindUsagesPresenter.cs (1)
286var vsWorkspace = document.Project.Solution.Workspace as VisualStudioWorkspace;
GenerateType\GenerateTypeDialogViewModel.cs (2)
440this.ProjectFolders = _projectManagementService.GetFolders(this.SelectedProject.Id, this.SelectedProject.Solution.Workspace); 777this.ProjectFolders = _projectManagementService.GetFolders(this.SelectedProject.Id, this.SelectedProject.Solution.Workspace);
GenerateType\VisualStudioGenerateTypeOptionsServiceFactory.cs (1)
69var defaultNamespace = projectManagementService.GetDefaultNamespace(viewModel.SelectedProject, viewModel.SelectedProject?.Solution.Workspace);
LanguageService\AbstractLanguageService`2.cs (1)
197if (openDocument?.Project.Solution.Workspace is MetadataAsSourceWorkspace masWorkspace)
Library\ObjectBrowser\Extensions.cs (3)
68else if (project.Solution.Workspace is VisualStudioWorkspace workspace 102if (project.Solution.Workspace is not VisualStudioWorkspaceImpl) 126if (project.Solution.Workspace is not VisualStudioWorkspace workspace)
Library\VsNavInfo\NavInfoFactory.cs (1)
179if (project.Solution.Workspace is not VisualStudioWorkspace workspace)
Preview\FileChange.cs (1)
220var workspace = document.Project.Solution.Workspace;
Preview\PreviewEngine.cs (1)
118var changedDocuments = projectChanges.SelectMany(p => p.GetChangedDocuments(onlyGetDocumentsWithTextChanges: true, _oldSolution.Workspace.IgnoreUnchangeableDocumentsWhenApplyingChanges));
Progression\GraphNavigatorExtension.cs (1)
97var editorWorkspace = document.Project.Solution.Workspace;
Progression\GraphNodeIdCreation.cs (1)
406if (solution.Workspace is VisualStudioWorkspace)
Snippets\AbstractSnippetExpansionClient.cs (2)
905foreach (var provider in GetArgumentProviders(document.Project.Solution.Workspace)) 1084var workspace = originalProject.Solution.Workspace;
ValueTracking\ValueTrackedTreeItemViewModel.cs (1)
67solution.Workspace,
Workspace\VisualStudioSymbolNavigationService.cs (3)
80solution.Workspace, targetDocument.Id, sourceLocation.SourceSpan, 172var editorWorkspace = openedDocument.Project.Solution.Workspace; 296if (document.Project.Solution.Workspace is VisualStudioWorkspace visualStudioWorkspace
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Snippets\SnippetExpansionClient.cs (1)
129document.Project.Solution.Workspace.ApplyDocumentChanges(formattedDocument, cancellationToken);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (17)
PersistentStorage\AbstractPersistentStorageTests.cs (17)
498await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 519await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 630await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 654await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 673await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 678await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 694await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 699await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 715await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 736await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 757await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 781await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 805await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 810await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 829await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 834await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution))) 1018_storageService = GetStorageService(solution.Workspace.Services.SolutionServices.ExportProvider, configuration, faultInjector, _persistentFolder.Path);
Microsoft.VisualStudio.LanguageServices.Implementation (4)
CodeModel\FileCodeModel.cs (3)
345var workspace = document.Project.Solution.Workspace; 369var workspace = document.Project.Solution.Workspace; 712_batchDocument.Project.Solution.Workspace.TryApplyChanges(newDocument.Project.Solution);
RoslynVisualStudioWorkspace.cs (1)
99var currentProject = project.Solution.Workspace.CurrentSolution.GetProject(project.Id);
Microsoft.VisualStudio.LanguageServices.LiveShare.UnitTests (1)
AbstractLiveShareRequestHandlerTests.cs (1)
70var workspace = (TestWorkspace)solution.Workspace;
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
Venus\DocumentService_IntegrationTests.vb (2)
271Dim testWorkspace = DirectCast(document.Project.Solution.Workspace, TestWorkspace) 309Dim testWorkspace = DirectCast(document.Project.Solution.Workspace, TestWorkspace)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Snippets\SnippetExpansionClient.vb (1)
140document.Project.Solution.Workspace.ApplyDocumentChanges(formattedDocument, cancellationToken)