Example #1
0
        public override async Task <RHost> ConnectAsync(HostConnectionInfo connectionInfo, CancellationToken cancellationToken = new CancellationToken())
        {
            var host = await base.ConnectAsync(connectionInfo, cancellationToken);

            var aboutHost = await GetHostInformationAsync <AboutHost>(cancellationToken);

            var brokerIncompatibleMessage = aboutHost?.IsHostVersionCompatible();

            if (brokerIncompatibleMessage != null)
            {
                throw new RHostDisconnectedException(brokerIncompatibleMessage);
            }

            return(host);
        }
Example #2
0
 public Task <RHost> ConnectAsync(HostConnectionInfo connectionInfo, CancellationToken cancellationToken = default(CancellationToken))
 => _broker.ConnectAsync(connectionInfo, cancellationToken);
        public override async Task <RHost> ConnectAsync(HostConnectionInfo connectionInfo, CancellationToken cancellationToken = default(CancellationToken))
        {
            await EnsureBrokerStartedAsync(cancellationToken);

            return(await base.ConnectAsync(connectionInfo, cancellationToken));
        }
Example #4
0
 public Task <RHost> ConnectAsync(HostConnectionInfo connectionInfo, CancellationToken cancellationToken = default) => Result;