Example #1
0
 public void RunOnWorkThreadDelayed(CsRunnableWithParam runnable, long delayMillis, params object[] paramArray)
 {
     DispatchQueue.DefaultGlobalQueue.DispatchAfter(new DispatchTime(((ulong)(DateTimeOffset.Now.ToUnixTimeMilliseconds() + delayMillis)) * 1000000), delegate()
     {
         runnable(paramArray);
     });
 }
Example #2
0
 public void RunOnMainThread(CsRunnableWithParam runnable, params object[] paramArray)
 {
     NSOperationQueue.MainQueue.AddOperation(delegate()
     {
         runnable(paramArray);
     });
 }
Example #3
0
 public void RunOnWorkThread(CsRunnableWithParam runnable, params object[] paramArray)
 {
     new NSOperationQueue().AddOperation(delegate() {
         runnable(paramArray);
     });
 }
Example #4
0
 public LocalRunnable(CsRunnableWithParam runnable, long delayMillis, params object[] paramArray)
 {
     mRunnableWithParam = runnable ?? throw new System.NullReferenceException("runnable == null");
     mDelayMillis       = delayMillis;
     mParamArray        = paramArray;
 }
Example #5
0
 public void RunOnWorkThreadDelayed(CsRunnableWithParam runnable, long delayMillis, params object[] paramArray)
 {
     new Java.Lang.Thread(new LocalRunnable(runnable, delayMillis, paramArray)).Start();
 }
Example #6
0
 public void RunOnWorkThread(CsRunnableWithParam runnable, params object[] paramArray)
 {
     new Java.Lang.Thread(new LocalRunnable(runnable, 0, paramArray)).Start();
 }
Example #7
0
 public void RunOnMainThreadDelayed(CsRunnableWithParam runnable, long delayMillis, params object[] paramArray)
 {
     new Handler(Looper.MainLooper).PostDelayed(new LocalRunnable(runnable, 0, paramArray), delayMillis);
 }
Example #8
0
 public void RunOnMainThread(CsRunnableWithParam runnable, params object[] paramArray)
 {
     new Handler(Looper.MainLooper).Post(new LocalRunnable(runnable, 0, paramArray));
 }