Exemple #1
0
        // Token: 0x060002C7 RID: 711 RVA: 0x0000A3B0 File Offset: 0x000085B0
        public static void Execute()
        {
            List <Events> list = new List <Events>();

            foreach (TaskInfo taskInfo in TaskManager.tasklist)
            {
                if (taskInfo.enabled != 0 && !(taskInfo.type == ""))
                {
                    list.Add(new Events
                    {
                        Name         = taskInfo.name,
                        Key          = taskInfo.key,
                        Minutes      = taskInfo.minutes,
                        ScheduleType = taskInfo.type,
                        TimeOfDay    = taskInfo.timeofday
                    });
                }
            }
            Events[] array = list.ToArray();
            if (array != null)
            {
                foreach (Events events in array)
                {
                    if (events.ShouldExecute)
                    {
                        events.UpdateTime();
                        IEvent ieventInstance = events.IEventInstance;
                        ManagedThreadPool.QueueUserWorkItem(new WaitCallback(ieventInstance.Execute));
                    }
                }
            }
        }
Exemple #2
0
 // Token: 0x060002AB RID: 683 RVA: 0x00009EF0 File Offset: 0x000080F0
 public static void Reset()
 {
     lock (ManagedThreadPool._poolLock)
     {
         try
         {
             foreach (object obj in ManagedThreadPool._waitingCallbacks)
             {
                 ManagedThreadPool.WaitingCallback waitingCallback = (ManagedThreadPool.WaitingCallback)obj;
                 if (waitingCallback.State is IDisposable)
                 {
                     ((IDisposable)waitingCallback.State).Dispose();
                 }
             }
         }
         catch
         {
         }
         try
         {
             foreach (object obj2 in ManagedThreadPool._workerThreads)
             {
                 Thread thread = (Thread)obj2;
                 if (thread != null)
                 {
                     thread.Abort("reset");
                 }
             }
         }
         catch
         {
         }
         ManagedThreadPool.Initialize();
     }
 }
Exemple #3
0
        // Token: 0x060002C8 RID: 712 RVA: 0x0000A4F8 File Offset: 0x000086F8
        public static void Execute(TaskInfo taskinfo)
        {
            Events events = new Events();

            events.Name         = taskinfo.name;
            events.Key          = taskinfo.key;
            events.Minutes      = taskinfo.minutes;
            events.ScheduleType = taskinfo.type;
            events.TimeOfDay    = taskinfo.timeofday;
            events.UpdateTime();
            IEvent ieventInstance = events.IEventInstance;

            ManagedThreadPool.QueueUserWorkItem(new WaitCallback(ieventInstance.Execute));
        }
Exemple #4
0
 // Token: 0x060002A9 RID: 681 RVA: 0x00009E8B File Offset: 0x0000808B
 public static void QueueUserWorkItem(WaitCallback callback)
 {
     ManagedThreadPool.QueueUserWorkItem(callback, null);
 }
Exemple #5
0
 // Token: 0x060002A7 RID: 679 RVA: 0x00009DEC File Offset: 0x00007FEC
 static ManagedThreadPool()
 {
     ManagedThreadPool.Initialize();
 }