예제 #1
0
        public void AddTask(string title, string description, User assignedTo, TaskStatus status)
        {
            var task = new TaskState
            {
                Id              = SequencialGuidGenerator.NewSequentialGuid(),
                TaskNumber      = new Random().Next(),
                Title           = title,
                Description     = description,
                AssignedTo      = assignedTo.State,
                CreatedDateTime = DateTime.UtcNow,
                Status          = status
            };

            State.Tasks.Add(task);
        }
예제 #2
0
        public void UpdateTask(string title, string description, User assignedTo, TaskStatus status, int id)
        {
            Task task = State.Tasks.Find(t => t.TaskNumber == id).ToTask();

            task.UpdateTask(title, description, status, assignedTo);
        }