예제 #1
0
        public void Define(params Func <object>[] tasks)
        {
            TaskChain chain = new TaskChain();

            foreach (Func <object> task in tasks)
            {
                Task instance = this.GetTaskByHandler(task);

                if (instance != null)
                {
                    chain.Add(instance);
                }
            }

            this.chains.Add(chain);
        }
예제 #2
0
        public TaskResult Execute(string target)
        {
            TaskChain chain = this.chains.Single(x => x.Contains(target));

            return(chain.Execute(target));
        }