private void ExceptionOccured(object sender, ExceptionOccuredEventArgs e)
 {
     e.Retry = e.RetryCount < 2;
 }
        private bool NotifyExceptionOccured(Exception exception, int retryCount)
        {
            ExceptionOccuredEventArgs eventArgs = new ExceptionOccuredEventArgs(exception, retryCount);

            if (ExceptionOccured != null)
            {
                ExceptionOccured(this, eventArgs);
            }

            return eventArgs.Retry;
        }