Inheritance: IDisposable
Esempio n. 1
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;
            }
        }
Esempio n. 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);
            }
        }