Beispiel #1
0
        static void Main(string[] args)
        {
            var todos = new List <ToDoItem>
            {
                new ToDoItem(1, "Etudier python"),
                new ToDoItem(2, "Faire du sport")
            };

            var todoList = new ToDoList("Hertzy", todos);

            var newId = todoList.AddTodo("Courir");
            var todo  = todoList.GetById(newId);

            Console.WriteLine(todo);

            todoList.MarkComplete(newId, complete: true);

            var todoItemsWithCompleteIncluded = todoList.GetDoItems(true);

            GetDoItems(todoList.Username, todoItemsWithCompleteIncluded);

            var todoItemsWithCompleteNotIncluded = todoList.GetDoItems(false);

            GetDoItems(todoList.Username, todoItemsWithCompleteNotIncluded);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var todos = new List <ToDoItem>
            {
                new ToDoItem(1, "Etudier python"),
                new ToDoItem(2, "Faire du sport")
            };

            var todoList = new ToDoList("Hertzy", todos);

            var newId = todoList.AddTodo("Courir");
            var todo  = todoList.GetById(newId);

            Console.WriteLine(todo);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            string a = "Learn Redux";
            string b = "Play with Redux";
            string c = "Implement Redux in .NET";

            todoListStore = Ops.CreateStore(ToDoList.Reduce);
            todoListStore.StateChanged += ToDoListStateChanged;

            SendAction(ToDoList.AddTodo(a));
            SendAction(ToDoList.AddTodo(b));
            SendAction(ToDoList.AddTodo(c));

            SendAction(ToDoList.ToggleTodo(a));
            SendAction(ToDoList.ToggleTodo(b));
            SendAction(ToDoList.ToggleTodo(b));
            Console.ReadKey();
        }