Inheritance: IDisposable
        public async Task<HealthInfo> CheckHealthAsync(string address, CancellationToken cancellationToken)
        {
            var requestId = Guid.NewGuid();
            using (var wait = new ResponseWaiter(requestId, _messageTimeout))
            {
                _bus.Send(Address.Parse(address), new GetStatusRequest { RequestId = requestId });
                var response = await wait.GetResponseAsync(cancellationToken);

                return response != null ? Healthy(response) : MessageTimeoutResponse;
            }
        }
Beispiel #2
0
        public async Task <HealthInfo> CheckHealthAsync(string address, CancellationToken cancellationToken)
        {
            var requestId = Guid.NewGuid();

            using (var wait = new ResponseWaiter(requestId, _messageTimeout))
            {
                _bus.Send(Address.Parse(address), new GetStatusRequest {
                    RequestId = requestId
                });
                var response = await wait.GetResponseAsync(cancellationToken);

                return(response != null?Healthy(response) : MessageTimeoutResponse);
            }
        }