internal RazorRemoteHostClient( ServiceHubRemoteHostClient client, RazorServiceDescriptorsWrapper serviceDescriptors, RazorRemoteServiceCallbackDispatcherRegistry callbackDispatchers ) { _client = client; _serviceDescriptors = serviceDescriptors; _callbackDispatchers = callbackDispatchers; }
public static async Task <RazorRemoteHostClient?> TryGetClientAsync( HostWorkspaceServices services, RazorServiceDescriptorsWrapper serviceDescriptors, RazorRemoteServiceCallbackDispatcherRegistry callbackDispatchers, CancellationToken cancellationToken = default ) { var client = await RemoteHostClient .TryGetClientAsync(services, cancellationToken) .ConfigureAwait(false); if (client is null) { return(null); } return(new RazorRemoteHostClient( (ServiceHubRemoteHostClient)client, serviceDescriptors, callbackDispatchers )); }