Наследование: ISpecificationRunListener
    public override TaskResult Start(TaskExecutionNode node)
    {
      var task = (RunAssemblyTask) node.RemoteTask;

      _contextAssembly = LoadContextAssembly(task);
      if (_contextAssembly == null)
      {
        return TaskResult.Error;
      }

      var result = VersionCompatibilityChecker.Check(_contextAssembly);
      if (!result.Success)
      {
        Server.TaskExplain(task, result.Explanation);
        Server.TaskError(task, result.ErrorMessage);

        return TaskResult.Error;
      }

      _listener = new PerAssemblyRunListener(Server, task);

      _runner = new DefaultRunner(_listener, RunOptions.Default, false);

      return TaskResult.Success;
    }
        public override TaskResult Start(TaskExecutionNode node)
        {
            var task = (RunAssemblyTask)node.RemoteTask;

            _contextAssembly = LoadContextAssembly(task);
            if (_contextAssembly == null)
            {
                return(TaskResult.Error);
            }

            var result = VersionCompatibilityChecker.Check(_contextAssembly);

            if (!result.Success)
            {
                Server.TaskExplain(task, result.Explanation);
                Server.TaskError(task, result.ErrorMessage);

                return(TaskResult.Error);
            }

            _listener = new PerAssemblyRunListener(Server, task);

            _runner   = new DefaultRunner(_listener, RunOptions.Default);
            _runScope = GetRunScope(_runner);

            return(TaskResult.Success);
        }
        public override void ExecuteRecursive(TaskExecutionNode node)
        {
            var task = (RunAssemblyTask)node.RemoteTask;

            var contextAssembly = LoadContextAssembly(task);

            if (contextAssembly == null)
            {
                return;
            }

            var result = VersionCompatibilityChecker.Check(contextAssembly);

            if (!result.Success)
            {
                Server.TaskException(node.RemoteTask, new[] { new TaskException("no type", result.ErrorMessage, null) });

                return;
            }

            var listener = new PerAssemblyRunListener(Server, task);
            var runner   = new AppDomainRunner(listener, RunOptions.Default);
            var runScope = GetRunScope(runner);

            node.Flatten(x => x.Children).Each(children => RegisterRemoteTaskNotifications(listener, children));

            try
            {
                runScope.StartRun(contextAssembly);

                foreach (var child in node.Children)
                {
                    RunContext(runner, contextAssembly, child);
                }
            }
            finally
            {
                runScope.EndRun(contextAssembly);
            }
        }
    public override void ExecuteRecursive(TaskExecutionNode node)
    {
      var task = (RunAssemblyTask) node.RemoteTask;

      var contextAssembly = LoadContextAssembly(task);
      if (contextAssembly == null)
      {
        return;
      }

      var result = VersionCompatibilityChecker.Check(contextAssembly);
      if (!result.Success)
      {
        Server.TaskException(node.RemoteTask, new[] {new TaskException("no type", result.ErrorMessage, null)});

        return;
      }

      var listener = new PerAssemblyRunListener(Server, task);
      var runner = new AppDomainRunner(listener, RunOptions.Default);
      
      node.Flatten(x => x.Children).Each(children => RegisterRemoteTaskNotifications(listener, children));

      try
      {
        runner.StartRun(contextAssembly);
        foreach (var child in node.Children)
        {
          RunContext(runner, contextAssembly, child);
        }
      }
      finally
      {
        runner.EndRun(contextAssembly);
      }
    }
 void RegisterRemoteTaskNotifications(PerAssemblyRunListener listener, TaskExecutionNode node)
 {
   listener.RegisterTaskNotification(TaskNotificationFactory.CreateTaskNotification(node));
 }
 void RegisterRemoteTaskNotifications(PerAssemblyRunListener listener, TaskExecutionNode node)
 {
     listener.RegisterTaskNotification(TaskNotificationFactory.CreateTaskNotification(node));
 }