private void CheckTaskGroupName(UndoTask task, int listCount)
 {
     if (!string.IsNullOrEmpty(task.TaskGroupName))
     {
         throw new ArgumentException("Not support task group name now.");
     }
 }
 public void AddRecord(UndoTask task)
 {
     if (!this.taskService.Enable)
     {
         return;
     }
     if (this.IsRunningCompositeTask)
     {
         this.CheckSubTask(task);
         this.AddSubTask(task);
     }
     else
     {
         if (!string.IsNullOrEmpty(task.TaskGroupName))
         {
             throw new ArgumentException("Not support task group name now.");
         }
         this.PerformTask((UndoableTaskBase <object>)task);
     }
 }
 private void AddSubTask(UndoTask task)
 {
     this.taskList.Add((UndoableTaskBase <object>)task);
 }
 private void CheckSubTask(UndoTask task)
 {
     this.CheckTaskGroupName(task, this.taskList.Count);
 }