コード例 #1
0
 public static void Dispatch <T1, T2, T3>(this Action <T1, T2, T3> action, T1 arg1, T2 arg2, T3 arg3, Dispatcher dispatcher)
 {
     if (dispatcher.CheckAccess())
     {
         action(arg1, arg2, arg3);
     }
     else
     {
         dispatcher.BeginInvoke(() => action(arg1, arg2, arg3));
     }
 }
コード例 #2
0
 public static void Dispatch(this Action action, Dispatcher dispatcher)
 {
     if (dispatcher.CheckAccess())
     {
         action();
     }
     else
     {
         dispatcher.BeginInvoke(() => action());
     }
 }
コード例 #3
0
 public static void Dispatch <T>(this Action <T> action, T arg, Dispatcher dispatcher)
 {
     if (dispatcher.CheckAccess())
     {
         action(arg);
     }
     else
     {
         dispatcher.BeginInvoke(() => action(arg));
     }
 }
コード例 #4
-14
ファイル: UI.cs プロジェクト: jcookems/freezing-ninja
        public async static Task InvokeOnUI(CoreDispatcher d, Action a)
#endif
        {
#if WINDOWS_PHONE 
            d.BeginInvoke(a);
            await Task.Delay(0);
#elif !NETFX_CORE
            await d.BeginInvoke(a);
#else
            await d.RunAsync(CoreDispatcherPriority.Normal, new DispatchedHandler(a));
#endif
        }