Esempio n. 1
0
 /// <summary>
 /// Raises the <see cref="ScheduleDue"/> event.
 /// </summary>
 /// <param name="schedule"><see cref="Schedule"/> to send to <see cref="ScheduleDue"/> event.</param>
 protected virtual void OnScheduleDue(Schedule schedule)
 {
     if ((object)ScheduleDue != null)
     {
         EventArgs <Schedule> args = new EventArgs <Schedule>(schedule);
         foreach (EventHandler <EventArgs <Schedule> > handler in ScheduleDue.GetInvocationList())
         {
             // Asynchrnonously invoke handlers...
             handler.BeginInvoke(this, args, null, null);
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Raises the <see cref="ScheduleDue"/> event.
        /// </summary>
        /// <param name="schedule"><see cref="Schedule"/> to send to <see cref="ScheduleDue"/> event.</param>
        protected virtual void OnScheduleDue(Schedule schedule)
        {
            if ((object)ScheduleDue != null)
            {
                EventArgs <Schedule> args = new EventArgs <Schedule>(schedule);

                foreach (Delegate invocationFunction in ScheduleDue.GetInvocationList())
                {
                    EventHandler <EventArgs <Schedule> > handler = invocationFunction as EventHandler <EventArgs <Schedule> >;

                    // Asynchronously invoke handlers...
                    if ((object)handler != null)
                    {
                        handler.BeginInvoke(this, args, null, null);
                    }
                }
            }
        }