bool ITaskListRepository.CanChangeName(TaskListData taskList)
 {
     return false;
 }
 void ITaskListRepository.UpdateName(TaskListData taskList)
 {
     throw new NotSupportedException ("Cannot change the name of a task list.");
 }
        public IEnumerable<TaskListData> GetAll()
        {
            var lists = backend.Rtm.ListsGetList ();
            foreach (var list in lists.listCollection) {
                var taskList = new TaskListData (list.ID) {
                    ListType = list.Smart == 1 ? TaskListType.Smart : TaskListType.Regular,
                    Name = list.Name
                };

                yield return taskList;
            }
        }
 void ITaskListRepository.Delete(TaskListData taskList)
 {
     backend.Rtm.ListsDelete (backend.Timeline, taskList.Id);
 }
Beispiel #5
0
        /// <summary>
        /// Creates a new task list.
        /// </summary>
        /// <param name="name">The task list name.</param>
        public void CreateTaskList(string name)
        {
            if (name == null)
                throw new ArgumentNullException ("name");
            if (string.IsNullOrWhiteSpace (name))
                throw new ArgumentException (
            #if GETTEXT
                    Catalog.GetString ("You must provide a name for the task list.")
            #elif ANDROID

            #endif
                    , "name");
            var listType = TaskListType.Regular;
            var id = repos.TaskListRepository.Create (name, listType);
            var taskListData = new TaskListData (id) { Name = name, ListType = listType };
            var list = new TaskList (taskListData, repos);
            taskLists.Add (list);
        }
 public void UpdateName(TaskListData taskList)
 {
     var dummyList = backend.GetTaskListBy (taskList.Id);
     dummyList.ListName = taskList.Name;
 }
 public void Delete(TaskListData taskList)
 {
     throw new NotImplementedException ();
 }
 public bool CanChangeName(TaskListData taskList)
 {
     return true;
 }