Example #1
0
        public Task SendAsync(TCommand command)
        {
            var stopwatch = Stopwatch.StartNew();

            return(_endpointClient.SendAsync(command)
                   .ContinueWith(_ =>
            {
                stopwatch.Stop();
                _monitor.MessageSent(command, stopwatch.Elapsed);
            }, TaskContinuationOptions.ExecuteSynchronously));
        }
 public Task SendAsync(TCommand command)
 {
     return(_endpointClient.SendAsync(command));
 }