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