public void Initialize() { if (_updateQueue == null) { _updateQueue = new Queue <Action>(); UpdateScheduler.Initialize(a => _updateQueue.Enqueue(a)); } _updateQueue.Clear(); }
public static void Initialize() { // Ensure that the UpdateScheduler has the ability to run delegates // on the UI thread. if (_mainDispatcher == null) { _mainDispatcher = Window.Current.Dispatcher; } UpdateScheduler.Initialize(RunOnUIThread); }
/// <summary> /// Initialize the binding manager for an activity. /// </summary> /// <param name="bindings">The binding manager for the activity.</param> /// <param name="activity">The activity that owns the binding manager.</param> public static void Initialize(this BindingManager bindings, Activity activity) { UpdateScheduler.Initialize(action => { ThreadPool.QueueUserWorkItem(delegate(Object obj) { activity.RunOnUiThread(action); }); }); }
/// <summary> /// Initialize the binding manager for a view controller. /// </summary> /// <param name="bindings">The binding manager for this view.</param> /// <param name="controller">The view controller for this view.</param> public static void Initialize(this BindingManager bindings, UIViewController controller) { UpdateScheduler.Initialize(a => controller.BeginInvokeOnMainThread(new Action(a))); }