public static BaseTaskVm GetTaskVmFromTask(Task task, TasksPageVm parentVm) { if (task.TaskType == TaskTypeEnum.Simple) { return(new SimpleTaskVm(task, parentVm)); } if (task.TaskType == TaskTypeEnum.Progress) { return(new ProgressTaskVm(task, parentVm)); } return(null); }
public BaseTaskVm(Task task, TasksPageVm parentVm) { Task = task; ParentVm = parentVm; }