public ITargetInternal DoAsync <T, T2>(Func <ITaskContextInternal, T, T2, Task> targetAction, T param, T2 param2, Action <DoTaskAsync3 <T, T2> > taskAction = null, TaskGroup taskGroup = null) { var task = new DoTaskAsync3 <T, T2>(targetAction, param, param2); taskAction?.Invoke(task); AddTaskToTaskGroup(taskGroup, task, TaskExecutionMode.Parallel); return(this); }
public ITarget DoAsync <T, T2>(Func <ITaskContextInternal, T, T2, Task> targetAction, T param, T2 param2, Action <DoTaskAsync3 <T, T2> > taskAction = null) { var task = new DoTaskAsync3 <T, T2>(targetAction, param, param2); taskAction?.Invoke(task); Tasks.Add(new Tuple <ITask, TaskExecutionMode>(task, TaskExecutionMode.Parallel)); return(this); }