示例#1
0
        static void Main(string[] args)
        {
            MyTaskFactory taskFactory = new MyTaskFactory();
            ITask         task        = taskFactory.getTask(TaskType.MultiThreading);

            task.Execute();
            Console.ReadLine();
        }
示例#2
0
        public void InitTaskTree(ref TaskTree _taskTree)
        {
            MyTask   myTask   = MyTaskFactory.CreateMyTask();
            TaskTree taskTree = MyTaskFactory.CreateMyTaskTree(MyTaskFactory.CreateListTaskTree(10));

            for (int i = 0; i < 10; i++)
            {
                taskTree[i] = MyTaskFactory.CreateMyTaskTree(MyTaskFactory.CreateListTaskTree(10));
            }
            _taskTree = taskTree;
        }