void ObjectSpaceOnCommitting(object sender, CancelEventArgs cancelEventArgs) { var eventArgs = new CancelEventArgs(); OnCommitting(eventArgs); if (!eventArgs.Cancel) { ObjectSpace.GetNonDeletedObjectsToSave <IXpandJobDetail>().ToList().ForEach(Save); _jobDetailsToBeDeleted.ForEach(DeleteFromScheduler); _jobDetailsToBeDeleted.Clear(); } }
void Save() { var customNonDeletedObjectsToSaveArgs = new CustomNonDeletedObjectsToSaveArgs(ObjectSpace.GetNonDeletedObjectsToSave <object>().ToList()); OnCustomNonDeletedObjectsToSave(customNonDeletedObjectsToSaveArgs); customNonDeletedObjectsToSaveArgs.Objects.OfType <IJobTriggerTriggerListenerTriggerLink>().ToList().ForEach(AddTriggerListeners); customNonDeletedObjectsToSaveArgs.Objects.OfType <IJobDetailJobListenerTriggerLink>().ToList().ForEach(AddJobListeners); customNonDeletedObjectsToSaveArgs.Objects.OfType <IJobDetailTriggerLink>().ToList().ForEach(ScheduleJob); customNonDeletedObjectsToSaveArgs.Objects.OfType <IJobSchedulerGroupTriggerLink>().ToList().ForEach(ScheduleGroup); }