static void Main(string[] args) { MyTaskFactory taskFactory = new MyTaskFactory(); ITask task = taskFactory.getTask(TaskType.MultiThreading); task.Execute(); Console.ReadLine(); }
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; }