コード例 #1
0
        public Task Ping()
        {
            var envelope = Envelope.ForPing(Destination);
            var message  = _protocol.WriteFromEnvelope(envelope);

            message.SessionId = Guid.NewGuid().ToString();

            return(_sender.SendAsync(message));
        }
コード例 #2
0
        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);
        }