public override WorkflowItemEvent LastEvent(bool includeRescheduleTimerEvents = false) { var lastEvent = WorkflowHistoryEvents.LastChildWorkflowEvent(this); WorkflowItemEvent timerEvent = null; if (includeRescheduleTimerEvents) { timerEvent = WorkflowHistoryEvents.LastTimerEvent(RescheduleTimer, true); } if (lastEvent > timerEvent) { return(lastEvent); } return(timerEvent); }