Ejemplo n.º 1
0
        private TResult Handle(TQuery query, int countDown)
        {
            try
            {
                return(_decorated.Handle(query));
            }
            catch (Exception ex)
            {
                if (!ex.IsRetryable() || --countDown <= 0)
                {
                    throw;
                }

                Thread.Sleep(300);

                return(Handle(query, countDown));
            }
        }
Ejemplo n.º 2
0
        public TResult Handle(TQuery command)
        {
            _validator.ValidateAndThrow(command);

            return(_decorated.Handle(command));
        }