public async Task SetSessionAsync(CollaborationSession session) { _session = session; StartSolutionCrawler(); // Get the initial workspace roots and update any files that have been opened. await UpdatePathsToRemoteFilesAsync(session).ConfigureAwait(false); _vsFolderWorkspaceService.OnActiveWorkspaceChanged += OnActiveWorkspaceChangedAsync; session.RemoteServicesChanged += (object sender, RemoteServicesChangedEventArgs e) => { _remoteDiagnosticListTable.UpdateWorkspaceDiagnosticsPresent(_session.RemoteServiceNames.Contains("workspaceDiagnostics")); }; }
public async Task SetSession(CollaborationSession session) { _session = session; var roots = await session.ListRootsAsync(CancellationToken.None).ConfigureAwait(false); _remoteRootPath = session.ConvertSharedUriToLocalPath(roots[0]); _remoteRootPath = _remoteRootPath.Substring(0, _remoteRootPath.Length - 1); var lastSlash = _remoteRootPath.LastIndexOf('\\'); _externalPath = _remoteRootPath.Substring(0, lastSlash + 1); _externalPath += "~external"; IsRemoteSession = true; session.RemoteServicesChanged += (object sender, RemoteServicesChangedEventArgs e) => { _remoteDiagnosticListTable.UpdateWorkspaceDiagnosticsPresent(_session.RemoteServiceNames.Contains("workspaceDiagnostics")); }; }