/// <summary> /// /// </summary> /// <param name="taskNo"></param> /// <returns></returns> public Task GetTask(int taskNo) { string xpath = "/Tasks/task[@no='" + taskNo + "']"; XmlNode taskNode = data.SelectSingleNode(xpath); Task task = Data.ToTask(taskNode); return(task); }
public IList <Task> GetTaskList() { IList <Task> taskList = new List <Task>(); XmlNodeList taskNodelist = data.SelectNodes("/Tasks/task"); foreach (XmlNode taskXml in taskNodelist) { Task task = Data.ToTask(taskXml); taskList.Add(task); } return(taskList); }