Ejemplo n.º 1
0
 public static SpaceTasksListItem MapItem(SpaceTasksListItemDto dto)
 {
     return(new SpaceTasksListItem
     {
         Enabled = dto.Enabled,
         Id = Guid.Parse(dto.JobId),
         IsRunning = dto.IsRunning,
         TaskName = dto.Name,
         Note = dto.Note,
         ProjectPath = dto.ProjectFile,
         StatusText = dto.StatusText,
         TaskState = TaskStatusMapper.ParseTaskState(dto.Status)
     });
 }
Ejemplo n.º 2
0
        public static SpaceTask MapFull(SpaceTaskDto dto)
        {
            var rsult = new SpaceTask
            {
                Enabled     = dto.Enabled,
                Id          = Guid.Parse(dto.JobId),
                IsRunning   = dto.IsRunning,
                TaskName    = dto.Name,
                Note        = dto.Note,
                ProjectPath = dto.ProjectFile,
                StatusText  = dto.StatusText,
                TaskState   = TaskStatusMapper.ParseTaskState(dto.Status),
            };

            if (dto.JobParameters != null)
            {
                rsult.TaskParameters = dto.JobParameters.Select(TaskParameterMapper.FromDto).ToList();
            }
            return(rsult);
        }