/// <summary> /// Transfer all the tasks to another tasklist, used for merging /// </summary> /// <param name="tasklist"> /// The other <see cref="TaskList"/> tasklist to send the tasks to /// </param> public void TransferTasksTo(TaskList tasklist) { List<Task> to_transfer = new List<Task> (); foreach (Task task in Tasks) { if (!task.WasDeleted) { Logger.Debug ("adding task " + task.Description ()); to_transfer.Add (task); } } foreach (Task task in to_transfer) { tasklist.AddFinishedTask (task); task.RemoveTag (Tag); Tasks.Remove (task); } Delete (); tasklist.LockEnd (); }