public async Task <RemoteHostClient> CreateAsync(Workspace workspace, CancellationToken cancellationToken) { // this is the point where we can create different kind of remote host client in future (cloud or etc) if (workspace.Options.GetOption(RemoteHostClientFactoryOptions.RemoteHost_InProc)) { return(await InProcRemoteHostClient.CreateAsync(workspace, runCacheCleanup : true, cancellationToken : cancellationToken).ConfigureAwait(false)); } return(await ServiceHubRemoteHostClient.CreateAsync(workspace, cancellationToken).ConfigureAwait(false)); }
public Task <RemoteHostClient> CreateAsync(Workspace workspace, CancellationToken cancellationToken) { // this is the point where we can create different kind of remote host client in future (cloud or etc) if (workspace.Options.GetOption(RemoteHostClientFactoryOptions.RemoteHost_InProc)) { return(InProcRemoteHostClient.CreateAsync(workspace, cancellationToken)); } return(ServiceHubRemoteHostClient.CreateAsync(workspace, cancellationToken)); }