Exemplo n.º 1
0
 public WpfThread(ParameterizedThreadStart parameterizedThreadStart)
 {
     BackgroundThread = new Thread(x => CatchForAction.ExceptionToUIThread("WpfThreadPool Error", () => parameterizedThreadStart.Invoke(x)))
     {
         IsBackground = true
     };
 }
Exemplo n.º 2
0
 public WpfThread(ThreadStart threadStart)
 {
     BackgroundThread = new Thread(() => CatchForAction.ExceptionToUIThread("WpfThread Error", threadStart.Invoke))
     {
         IsBackground = true
     };
 }
Exemplo n.º 3
0
 public static void UnsafeQueueUserWorkItem(WaitCallback callback, object state)
 {
     ThreadPool.UnsafeQueueUserWorkItem(x => CatchForAction.ExceptionToUIThread("WpfThreadPool Error", () => callback(state)), null);
 }
Exemplo n.º 4
0
 public static void QueueUserWorkItem(WaitCallback callback)
 {
     ThreadPool.QueueUserWorkItem(x => CatchForAction.ExceptionToUIThread("WpfThreadPool Error", () => callback(x)));
 }
Exemplo n.º 5
0
 public static Task FactoryStartNew(Action action)
 {
     return(Task.Factory.StartNew(() => CatchForAction.ExceptionToUIThread("Factory Task Error", action)));
 }