IVsCustomWorkspaceService.OpenWorkspaceAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create a custom workspace to be displayed in VS
public:
System::Threading::Tasks::Task<Microsoft::VisualStudio::Workspace::IWorkspace ^> ^ OpenWorkspaceAsync(System::String ^ path, bool enableFileWatcher, bool addToWorkspaceHistory, Microsoft::VisualStudio::Workspace::Indexing::IndexElement elements, Microsoft::VisualStudio::Workspace::VSIntegration::VsWorkspaceFactoryProviders ^ workspaceFactoryProviders);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.IWorkspace> OpenWorkspaceAsync (string path, bool enableFileWatcher, bool addToWorkspaceHistory, Microsoft.VisualStudio.Workspace.Indexing.IndexElement elements, Microsoft.VisualStudio.Workspace.VSIntegration.VsWorkspaceFactoryProviders workspaceFactoryProviders);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.IWorkspace> OpenWorkspaceAsync (string path, bool enableFileWatcher, bool addToWorkspaceHistory, Microsoft.VisualStudio.Workspace.Indexing.IndexElement elements, Microsoft.VisualStudio.Workspace.VSIntegration.VsWorkspaceFactoryProviders? workspaceFactoryProviders);
abstract member OpenWorkspaceAsync : string * bool * bool * Microsoft.VisualStudio.Workspace.Indexing.IndexElement * Microsoft.VisualStudio.Workspace.VSIntegration.VsWorkspaceFactoryProviders -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.IWorkspace>
Public Function OpenWorkspaceAsync (path As String, enableFileWatcher As Boolean, addToWorkspaceHistory As Boolean, elements As IndexElement, workspaceFactoryProviders As VsWorkspaceFactoryProviders) As Task(Of IWorkspace)
Parameters
- path
- String
Path to directory to open
- enableFileWatcher
- Boolean
If a file watcher is desired
- addToWorkspaceHistory
- Boolean
A value indicating whether the workspace path should be added to VS MRU and Windows jump list.
- elements
- IndexElement
Which indexing elements are enabled
- workspaceFactoryProviders
- VsWorkspaceFactoryProviders
An optional workspace factory providers instance
Returns
Created workspace to be displayed