예제 #1
0
 /// <summary>
 /// Invokes the action on the thread and blocks until it completes.
 /// </summary>
 /// <param name="actionWithId">The delegate that will be executed on the thread.</param>
 /// <param name="arg">The single argument passed to the target. May be nil.</param>
 public void Invoke(Action<Id> actionWithId, Id arg)
 {
     NSThreadLauncher launcher = new NSThreadLauncher(actionWithId);
     launcher.PerformSelectorOnThreadWithObjectWaitUntilDone(NSThreadLauncher.LaunchSelector, this, arg, true);
 }
예제 #2
0
 /// <summary>
 /// Invokes the action on the thread and blocks until it completes.
 /// </summary>
 /// <param name="actionWithState">The delegate that will be executed on the thread.</param>
 /// <param name="state">The single argument passed to the target. May be nil.</param>
 public void Invoke(Action<Object> actionWithState, Object state)
 {
     NSValue arg = WrapState(state);
     NSThreadLauncher launcher = new NSThreadLauncher(actionWithState);
     launcher.PerformSelectorOnThreadWithObjectWaitUntilDone(NSThreadLauncher.LaunchSelector, this, arg, true);
 }
예제 #3
0
 /// <summary>
 /// Invokes the action on the thread and blocks until it completes.
 /// </summary>
 /// <param name="action">Action to invoke.</param>
 public void Invoke(Action action)
 {
     NSThreadLauncher launcher = new NSThreadLauncher(action);
     launcher.PerformSelectorOnThreadWithObjectWaitUntilDone(NSThreadLauncher.LaunchSelector, this, null, true);
 }