예제 #1
0
        /// <summary>
        ///     Called after deletion of the specified enumeration of entities has taken place.
        /// </summary>
        /// <param name="entities">The entities.</param>
        /// <param name="state">The state passed between the before delete and after delete callbacks.</param>
        public void OnAfterDelete(IEnumerable <long> entities, IDictionary <string, object> state)
        {
            var itemsToUnschedule = (List <long>)state[idsKey];

            foreach (var entityId in itemsToUnschedule)
            {
                SchedulingSyncHelper.DeleteScheduledJob(entityId, SchedulingHelper.Instance);
            }
        }
예제 #2
0
        /// <summary>
        ///     Called after deletion of the specified enumeration of entities has taken place.
        /// </summary>
        /// <param name="entities">The entities.</param>
        /// <param name="state">The state passed between the before delete and after delete callbacks.</param>
        public void OnAfterDelete(IEnumerable <long> entities, IDictionary <string, object> state)
        {
            if (entities == null)
            {
                return;
            }

            foreach (var entityId in entities)
            {
                SchedulingSyncHelper.DeleteScheduledJob(entityId, SchedulingHelper.Instance);
            }
        }