Exemple #1
0
 /// <summary>
 /// The raise global event start.
 /// </summary>
 /// <param name="runningEventData">
 /// The running event data.
 /// </param>
 /// <param name="forceSeparateThread">
 /// The force separate thread.
 /// </param>
 private static void RaiseGlobalEventStart(RunningEventData runningEventData, bool forceSeparateThread)
 {
     if (forceSeparateThread)
     {
         runningEventData.separateThread = new Thread(DoRaiseGlobalEvent);
         runningEventData.separateThread.Start(runningEventData);
     }
     else
     {
         DoRaiseGlobalEvent(runningEventData);
     }
 }
Exemple #2
0
        /// <summary>
        /// The do raise global event.
        /// </summary>
        /// <param name="runningEventData">
        /// The running event data.
        /// </param>
        private static void DoRaiseGlobalEvent(RunningEventData runningEventData)
        {
            bool flag;

            do
            {
                flag = false;
                try
                {
                    // GlobalEventAction(runningEventData);
                }
                catch (Exception exception)
                {
                    FomsLogger.WriteError(exception, null);
                }

                try
                {
                    lock (runningEvents)
                    {
                        // if (runningEventData.TakeNextPending() && GlobalEventAction(runningEventData.globalEvent, null))
                        // {
                        // if (runningEventData.separateThread != null)
                        // {
                        // flag = true;
                        // }
                        // else
                        // {
                        // bool forceSeparateThread = true;
                        {
                            // RaiseGlobalEventStart(runningEventData, forceSeparateThread);
                            // }
                            // }

                            // else
                            runningEvents.Remove(runningEventData.globalEvent);
                        }
                    }
                }
                catch (Exception exception2)
                {
                    FomsLogger.WriteError(exception2, null);
                }
            }while (flag);
        }