/// <summary>
 /// Limit the rescheduling. Once the limit is reached, Guflow returns the default WorkflowAction for event.
 /// </summary>
 /// <param name="limit"></param>
 /// <returns></returns>
 public WorkflowAction UpTo(Limit limit)
 {
     if (limit.IsExceeded(_workflowItem))
     {
         _scheduleWorkflowAction = _workflowItem.DefaultActionOnLastEvent();
     }
     return(this);
 }
        /// <summary>
        /// Limit the scheduling. Once the limit is reached, Guflow returns the default WorkflowAction for event.
        /// </summary>
        /// <param name="times"></param>
        /// <returns></returns>
        public WorkflowAction UpTo(uint times)
        {
            var limit = Limit.Count(times);

            if (limit.IsExceeded(_workflowItem))
            {
                _scheduleWorkflowAction = _workflowItem.DefaultActionOnLastEvent();
            }
            return(this);
        }