示例#1
0
文件: Task.cs 项目: Mofsy/jinxbot
        protected Task(XElement element, Task parent)
        {
            Debug.Assert(element != null);

            Node = element;
            Parent = parent;
        }
示例#2
0
        public static Task Create(XElement element, Task parent)
        {
            Type result;
            if (!_taskTypes.TryGetValue(element.Name.ToString(), out result))
                throw new ArgumentOutOfRangeException("element", element.Name, "Unsupported manifest task type.");

            return Activator.CreateInstance(result, element, parent) as Task;
        }
示例#3
0
 public ContainerTask(XElement node, Task parent)
     : base(node, parent)
 {
     List<Task> childTasks = new List<Task>();
     foreach (XElement child in node.Elements())
     {
         childTasks.Add(TaskFactory.Create(child, this));
     }
     Tasks = childTasks;
 }
示例#4
0
 internal ContainerTask(XElement node, Task parent, bool populateChildTasks)
     : base(node, parent)
 {
     if (populateChildTasks)
     {
         List<Task> childTasks = new List<Task>();
         foreach (XElement child in node.Elements())
         {
             childTasks.Add(TaskFactory.Create(child, this));
         }
         Tasks = childTasks;
     }
 }
示例#5
0
        public EnsureDirectoriesTask(XElement element, Task parent)
            : base(element, parent)
        {

        }
示例#6
0
 public SetVariableTask(XElement element, Task parent)
     : base(element, parent)
 {
     VariableName = element.Attribute("VariableName").Value;
     OriginalValue = element.Attribute("Value").Value;
 }
示例#7
0
        protected ConditionalTask(XElement element, Task parent)
            : base(element, parent, false)
        {

        }
示例#8
0
        public IfStepSucceededTask(XElement element, Task parent)
            : base(element, parent)
        {

        }
示例#9
0
        public KillAllProcessesTask(XElement element, Task parent)
            : base(element, parent)
        {

        }
示例#10
0
        public CopyAllFilesTask(XElement element, Task parent)
            : base(element, parent)
        {

        }