public GetResponseAsync ( |
||
token | ||
Результат | Task |
public async Task<HealthInfo> CheckHealthAsync(string address, CancellationToken cancellationToken) { var requestId = Guid.NewGuid(); using (var wait = new ResponseWaiter(requestId, _messageTimeout)) { SendHealthRequest(address, requestId); var response = await wait.GetResponseAsync(cancellationToken); return response != null ? Healthy(response) : MessageTimeoutResponse; } }
public async Task <HealthInfo> CheckHealthAsync(string address, CancellationToken cancellationToken) { var requestId = Guid.NewGuid(); using (var wait = new ResponseWaiter(requestId, _messageTimeout)) { SendHealthRequest(address, requestId); var response = await wait.GetResponseAsync(cancellationToken); return(response != null?Healthy(response) : MessageTimeoutResponse); } }
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); } }