Ejemplo n.º 1
0
        public ITargetInternal DoAsync(Func <ITaskContextInternal, Task> targetAction, Action <DoTaskAsync> taskAction = null, TaskGroup taskGroup = null)
        {
            var task = new DoTaskAsync(targetAction);

            taskAction?.Invoke(task);
            AddTaskToTaskGroup(taskGroup, task, TaskExecutionMode.Parallel);
            return(this);
        }
Ejemplo n.º 2
0
        public ITarget DoAsync(Func <ITaskContextInternal, Task> targetAction, Action <DoTaskAsync> taskAction = null)
        {
            var task = new DoTaskAsync(targetAction);

            taskAction?.Invoke(task);
            Tasks.Add(new Tuple <ITask, TaskExecutionMode>(task, TaskExecutionMode.Parallel));
            return(this);
        }