Example #1
0
        /// <summary>
        /// Starts the given Task when this Task ended successfully.
        /// </summary>
        /// <param name="that">The that.</param>
        /// <param name="followingTask">The task to start.</param>
        /// <returns>
        /// This task.
        /// </returns>
        public static CustomTask Then(this CustomTask that, CustomTask followingTask)
        {
            TaskDistributor target = null;

            if (CustomThread.CurrentThread is TaskWorker)
            {
                target = ((TaskWorker)CustomThread.CurrentThread).TaskDistributor;
            }
            return(that.Then(followingTask, target));
        }
Example #2
0
 /// <summary>
 /// Starts this Task when the other Task ended successfully.
 /// </summary>
 /// <param name="that">The that.</param>
 /// <param name="taskToWaitFor">The task to wait for.</param>
 /// <param name="target">The DispatcherBase to start this task on.</param>
 /// <returns>
 /// This task.
 /// </returns>
 public static CustomTask Await(this CustomTask that, CustomTask taskToWaitFor, CustomTaskDispatcherBase target)
 {
     taskToWaitFor.Then(that, target);
     return(that);
 }
Example #3
0
 /// <summary>
 /// Starts this Task when the other Task ended successfully.
 /// </summary>
 /// <param name="that">The that.</param>
 /// <param name="taskToWaitFor">The task to wait for.</param>
 /// <returns>
 /// This task.
 /// </returns>
 public static CustomTask Await(this CustomTask that, CustomTask taskToWaitFor)
 {
     taskToWaitFor.Then(that);
     return(that);
 }