Microsoft.R.Host.Client.Session.RSessionProvider.CreateBrokerClient C# (CSharp) Méthode

CreateBrokerClient() private méthode

private CreateBrokerClient ( string name, string path, CancellationToken cancellationToken ) : IBrokerClient
name string
path string
cancellationToken System.Threading.CancellationToken
Résultat IBrokerClient
        private IBrokerClient CreateBrokerClient(string name, string path, CancellationToken cancellationToken) {
            path = path ?? new RInstallation().GetCompatibleEngines().FirstOrDefault()?.InstallPath;

            Uri uri;
            if (!Uri.TryCreate(path, UriKind.Absolute, out uri)) {
                return null;
            }

            if (uri.IsFile) {
                return new LocalBrokerClient(name, uri.LocalPath, _services, _console);
            }

            return new RemoteBrokerClient(name, uri, _services, _console, cancellationToken);
        }