示例#1
0
 public TaskNode(TaskExecutionNode node, TaskEnvironment environment, TaskNode parent = null)
 {
     Task        = node.RemoteTask;
     Environment = environment;
     Parent      = parent;
     Status      = TaskStatus.NotStarted;
     Result      = TaskResult.Skipped;
     Children    = node.Children.Select(child => new TaskNode(child, environment, this)).ToArray();
 }
        public override void ExecuteRecursive(TaskExecutionNode node)
        {
            //Debugger.Break();

            var assemblyTaskProviders = UnitTestTaskProviderFactory.GetAssemblyTaskProviders();
            var classTaskProviders = UnitTestTaskProviderFactory.GetClassTaskProviders();
            var methodTaskProviders = UnitTestTaskProviderFactory.GetMethodTaskProviders();

            var taskEnvironment = new TaskEnvironment(Server, assemblyTaskProviders, classTaskProviders, methodTaskProviders);
            var taskNode = new TaskNode(node, taskEnvironment);

            foreach (var silverlightTaskNode in taskNode.GetSilverlightTasks())
            {
                silverlightTaskNode.Execute(Execute);
            }
        }
        private void ExecuteSilverlightTasks(TaskExecutionNode node)
        {
            var assemblyTaskProviders = UnitTestTaskProviderFactory.GetAssemblyTaskProviders();
            var classTaskProviders = UnitTestTaskProviderFactory.GetClassTaskProviders();
            var methodTaskProviders = UnitTestTaskProviderFactory.GetMethodTaskProviders();

            var taskEnvironment = new TaskEnvironment(Server, assemblyTaskProviders, classTaskProviders, methodTaskProviders);
            var taskNode = new TaskNode(node, taskEnvironment);

            foreach (var silverlightTaskNode in taskNode.GetSilverlightTasks())
            {
                silverlightTaskNode.Execute(Execute);
            }
        }