Beispiel #1
0
 /// <summary>
 /// Asynchronously invokes the action on a new thread and returns immediately.
 /// </summary>
 /// <param name="actionWithState">The delegate that will be executed on a new thread.</param>
 /// <param name="state">The single argument passed to the target. May be nil.</param>
 public static void StartNewThread(Action<Object> actionWithState, Object state)
 {
     NSValue arg = WrapState(state);
     NSThreadLauncher launcher = new NSThreadLauncher(actionWithState);
     launcher.PerformSelectorInBackgroundWithObject(NSThreadLauncher.LaunchSelector, arg);
 }
Beispiel #2
0
 /// <summary>
 /// Asynchronously invokes the action on a new thread and returns immediately.
 /// </summary>
 /// <param name="actionWithId">The delegate that will be executed on the new thread.</param>
 /// <param name="arg">The single argument passed to the target. May be nil.</param>
 public static void StartNewThread(Action<Id> actionWithId, Id arg)
 {
     NSThreadLauncher launcher = new NSThreadLauncher(actionWithId);
     launcher.PerformSelectorInBackgroundWithObject(NSThreadLauncher.LaunchSelector, arg);
 }
Beispiel #3
0
 /// <summary>
 /// Asynchronously invokes the action on a new thread and returns immediately.
 /// </summary>
 /// <param name="action">Action to invoke.</param>
 public static void StartNewThread(Action action)
 {
     NSThreadLauncher launcher = new NSThreadLauncher(action);
     launcher.PerformSelectorInBackgroundWithObject(NSThreadLauncher.LaunchSelector, null);
 }
Beispiel #4
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);
 }
Beispiel #5
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);
 }
Beispiel #6
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);
 }