public LocalBrokerClient(string name, BrokerConnectionInfo connectionInfo, IServiceContainer services, IConsole console, IRSessionProvider sessionProvider) : base(name, connectionInfo, _credentials, console, services, sessionProvider) { _rHome = connectionInfo.Uri.LocalPath; _services = services; IsVerified = true; }
public LocalBrokerClient(string name, BrokerConnectionInfo connectionInfo, IServiceContainer services, IConsole console, string rhostDirectory = null) : base(name, connectionInfo, _credentials, console, services) { _rHome = connectionInfo.Uri.LocalPath; _services = services; _rhostDirectory = rhostDirectory ?? Path.GetDirectoryName(typeof(RHost).GetTypeInfo().Assembly.GetAssemblyPath()); IsVerified = true; }
public RemoteBrokerClient(string name, BrokerConnectionInfo connectionInfo, ICoreServices services, IConsole console, CancellationToken cancellationToken) : base(name, connectionInfo, new RemoteCredentialsDecorator(connectionInfo.CredentialAuthority, connectionInfo.Name, services.Security, services.MainThread), services.Log, console) { _console = console; _services = services; _cancellationToken = cancellationToken; CreateHttpClient(connectionInfo.Uri); HttpClientHandler.ServerCertificateValidationCallback = ValidateCertificateHttpHandler; }
public RemoteBrokerClient(string name, IRSessionProvider sessionProvider, BrokerConnectionInfo connectionInfo, IServiceContainer services, IConsole console, CancellationToken cancellationToken) : base(name, connectionInfo, new RemoteCredentialsDecorator(connectionInfo.CredentialAuthority, connectionInfo.Name, services), console, services) { _console = console; _services = services; _cancellationToken = cancellationToken; _sessionProvider = sessionProvider; CreateHttpClient(connectionInfo.Uri); HttpClientHandler.ServerCertificateCustomValidationCallback = ValidateCertificateHttpHandler; }
private static async Task TestBrokerConnectionWithRHost(IBrokerClient brokerClient, CancellationToken cancellationToken) { var callbacks = new NullRCallbacks(); var connectionInfo = new BrokerConnectionInfo(nameof(TestBrokerConnectionAsync), callbacks); var rhost = await brokerClient.ConnectAsync(connectionInfo, cancellationToken); try { var rhostRunTask = rhost.Run(cancellationToken); callbacks.SetReadConsoleInput("q()\n"); await rhostRunTask; } finally { rhost.Dispose(); } }
public bool Equals(BrokerConnectionInfo other) => other.ParametersId.EqualsOrdinal(ParametersId) && Equals(other.Uri, Uri);
public override async Task<RHost> ConnectAsync(BrokerConnectionInfo connectionInfo, CancellationToken cancellationToken = default(CancellationToken)) { await EnsureBrokerStartedAsync(); return await base.ConnectAsync(connectionInfo, cancellationToken); }
public async Task <RHost> ConnectAsync(BrokerConnectionInfo connectionInfo, CancellationToken cancellationToken = default(CancellationToken), ReentrancyToken reentrancyToken = default(ReentrancyToken)) { using (await _connectArwl.ReaderLockAsync(cancellationToken, reentrancyToken)) { return(await _broker.ConnectAsync(connectionInfo, cancellationToken, reentrancyToken)); } }
public LocalBrokerClient(string name, BrokerConnectionInfo connectionInfo, IServiceContainer services) : base(name, connectionInfo, _credentials, services) { _rHome = connectionInfo.Uri.LocalPath; _services = services; }
public Task <RHost> ConnectAsync(BrokerConnectionInfo connectionInfo, CancellationToken cancellationToken = default(CancellationToken), ReentrancyToken reentrancyToken = default(ReentrancyToken)) => Result;
public override async Task <RHost> ConnectAsync(BrokerConnectionInfo connectionInfo, CancellationToken cancellationToken = default(CancellationToken), ReentrancyToken reentrancyToken = default(ReentrancyToken)) { await EnsureBrokerStartedAsync(); return(await base.ConnectAsync(connectionInfo, cancellationToken, reentrancyToken)); }