public Task Ping() { var envelope = Envelope.ForPing(Destination); var message = _protocol.WriteFromEnvelope(envelope); message.SessionId = Guid.NewGuid().ToString(); return(_sender.SendAsync(message)); }
public async Task <bool> Ping(CancellationToken cancellationToken) { var envelope = Envelope.ForPing(Destination); var message = _protocol.WriteFromEnvelope(envelope); message.SessionId = Guid.NewGuid().ToString(); await _sender.SendAsync(message); return(true); }