Beispiel #1
0
 public static void NotifyWorkItemProgress___lateredirect(global::System.Object o)
 {
     using (_ProtectingThreadContext.Acquire())
     {
         //global::System.Console.WriteLine("Intercepting ThreadPoolTaskScheduler.NotifyWorkItemProgress");
         Original::TaskScheduler self = (Original::TaskScheduler)o;
         var notifyWorkItemProgress   = self.GetType().GetMethod("NotifyWorkItemProgress",
                                                                 global::System.Reflection.BindingFlags.NonPublic |
                                                                 global::System.Reflection.BindingFlags.Instance);
         notifyWorkItemProgress.Invoke(self, new object[] { });
     }
 }
Beispiel #2
0
 public static bool get_RequiresAtomicStartTransition___lateredirect(global::System.Object o)
 {
     using (_ProtectingThreadContext.Acquire())
     {
         //global::System.Console.WriteLine("Intercepting ThreadPoolTaskScheduler.get_RequiresAtomicStartTransition");
         Original::TaskScheduler self          = (Original::TaskScheduler)o;
         var get_requiresAtomicStartTransition = self.GetType().GetMethod("get_RequiresAtomicStartTransition",
                                                                          global::System.Reflection.BindingFlags.NonPublic |
                                                                          global::System.Reflection.BindingFlags.Instance);
         return((bool)get_requiresAtomicStartTransition.Invoke(self, new object[] { }));
     }
 }
Beispiel #3
0
 public static bool TryDequeue___lateredirect(global::System.Object o, Original::Task task)
 {
     using (_ProtectingThreadContext.Acquire())
     {
         //global::System.Console.WriteLine("Intercepting ThreadPoolTaskScheduler.TryDequeue");
         Original::TaskScheduler self = (Original::TaskScheduler)o;
         var tryDequeue = self.GetType().GetMethod("TryDequeue",
                                                   global::System.Reflection.BindingFlags.NonPublic |
                                                   global::System.Reflection.BindingFlags.Instance);
         return((bool)tryDequeue.Invoke(self, new object[] { task }));
     }
 }
Beispiel #4
0
 public static IEnumerable <Original::Task> GetScheduledTasks___lateredirect(global::System.Object o)
 {
     using (_ProtectingThreadContext.Acquire())
     {
         //global::System.Console.WriteLine("Intercepting ThreadPoolTaskScheduler.GetScheduledTasks");
         Original::TaskScheduler self = (Original::TaskScheduler)o;
         var getScheduledTasks        = self.GetType().GetMethod("GetScheduledTasks",
                                                                 global::System.Reflection.BindingFlags.NonPublic |
                                                                 global::System.Reflection.BindingFlags.Instance);
         return((IEnumerable <Original::Task>)getScheduledTasks.Invoke(self, new object[] { }));
     }
 }