public static WorkflowItemEvent CreateWorkflowItemEventFor(this HistoryEvent historyEvent, IEnumerable <HistoryEvent> allHistoryEvents) { var activityEvent = historyEvent.CreateActivityEventFor(allHistoryEvents); return(activityEvent ?? historyEvent.CreateTimerEventFor(allHistoryEvents)); }