Example #1
0
 public static WorkflowItemEvent CreateTimerEventFor(this HistoryEvent historyEvent, IEnumerable <HistoryEvent> allHistoryEvents)
 {
     if (historyEvent.IsTimerFiredEvent())
     {
         return(new TimerFiredEvent(historyEvent, allHistoryEvents));
     }
     if (historyEvent.IsTimerStartedEvent())
     {
         return(new TimerStartedEvent(historyEvent, allHistoryEvents));
     }
     if (historyEvent.IsTimerStartFailedEvent())
     {
         return(new TimerStartFailedEvent(historyEvent));
     }
     if (historyEvent.IsTimerCancelledEvent())
     {
         return(new TimerCancelledEvent(historyEvent, allHistoryEvents));
     }
     if (historyEvent.IsTimerCancellationFailedEvent())
     {
         return(new TimerCancellationFailedEvent(historyEvent));
     }
     return(null);
 }