Пример #1
0
        protected void AddSubTask(DeploymentTaskBase subTask)
        {
            if (subTask == null)
              {
            throw new ArgumentNullException("subTask");
              }

              _subTasks.Add(subTask);

              // this will cause the events raised by sub-tasks to bubble up
              subTask.DiagnosticMessagePosted += OnDiagnosticMessagePosted;
        }
        private static void AssertStepIsBefore(Type stepBeforeType, Type stepAfterType, DeploymentTaskBase[] subTasks)
        {
            int i = 0;
              while (i < subTasks.Length && subTasks[i].GetType() != stepBeforeType)
              {
            i++;
              }

              Assert.Less(i, subTasks.Length);

              while (i < subTasks.Length && subTasks[i].GetType() != stepAfterType)
              {
            i++;
              }

              Assert.Less(i, subTasks.Length);
        }