public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices) { if (!RemoteHostOptions.IsUsingServiceHubOutOfProcess(workspaceServices) || workspaceServices.Workspace is not VisualStudioWorkspace) { // Run code in the current process return(new DefaultRemoteHostClientProvider()); } return(new VisualStudioRemoteHostClientProvider(workspaceServices, _vsServiceProvider)); }
public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices) { // We don't want to bring up the OOP process in a VS cloud environment client instance // Avoids proffering brokered services on the client instance. if (!RemoteHostOptions.IsUsingServiceHubOutOfProcess(workspaceServices) || workspaceServices.Workspace is not VisualStudioWorkspace || workspaceServices.GetRequiredService <IWorkspaceContextService>().IsCloudEnvironmentClient()) { // Run code in the current process return(new DefaultRemoteHostClientProvider()); } return(new VisualStudioRemoteHostClientProvider(workspaceServices, _vsServiceProvider, _threadingContext, _listenerProvider, _callbackDispatchers)); }