public static void EvaluateSchedule(SchedulingService service) { ICollection <ScheduleHandle> handles = new LinkedList <ScheduleHandle>(); service.Evaluate(handles); foreach (ScheduleHandle handle in handles) { if (handle is EPStatementHandleCallback) { EPStatementHandleCallback callback = (EPStatementHandleCallback)handle; callback.ScheduleCallback.ScheduledTrigger(null); } else { ScheduleHandleCallback cb = (ScheduleHandleCallback)handle; cb.ScheduledTrigger(null); } } }