Ejemplo n.º 1
0
        public override Task <ParseReply> Parse(ParseRequest request, ServerCallContext context)
        {
            var result = _taskParserService.ParseTask(request.Text);

            return(Task.FromResult(new ParseReply
            {
                Task = _mapper.Map <TaskModel>(result)
            }));
        }
Ejemplo n.º 2
0
        private TaskEntity CreateTaskFromRecurrence(PlannedRecurrenceEntity plannedRecurrence, DateTime date)
        {
            TaskDto dto  = _taskParserService.ParseTask(plannedRecurrence.Task, ignoreDate: true);
            var     task = _mapper.Map <TaskEntity>(dto);

            task.Date   = date;
            task.UserId = plannedRecurrence.UserId;
            task.Uid    = Guid.NewGuid().ToString();
            return(task);
        }