Exemple #1
0
 public static TaskLogAPI From(TaskLog item)
 {
     return(new TaskLogAPI
     {
         ID = item.ID,
         LogDate = item.LogDate,
         StartTime = item.StartTime,
         EndTime = item.EndTime,
         Description = item.Description,
         TaskID = item.TaskID,
         Task = TaskAPI.From(item.Task, false),
         CheckIns = item.CheckIns != null?CheckInAPI.From(item.CheckIns).ToList() : null,
                        Comments = item.Comments != null?TaskLogCommentAPI.From(item.Comments).ToList() : null
     });
 }
Exemple #2
0
 public static TaskLog To(TaskLogAPI item)
 {
     return(new TaskLog
     {
         ID = item.ID,
         LogDate = item.LogDate,
         StartTime = item.StartTime,
         EndTime = item.EndTime,
         Description = item.Description,
         TaskID = item.TaskID,
         Task = TaskAPI.To(item.Task, false),
         CheckIns = CheckInAPI.To(item.CheckIns),
         Comments = TaskLogCommentAPI.To(item.Comments)
     });
 }
Exemple #3
0
 public static Requirement To(RequirementAPI item, bool includeTasks = true, bool includeComments = true)
 {
     if (item != null)
     {
         return(new Requirement
         {
             ID = item.ID,
             Title = item.Title,
             Status = item.Status,
             Tasks = includeTasks ? TaskAPI.To(item.Tasks) : null,
             Comments = includeComments ? RequirementCommentAPI.To(item.Comments) : null,
             FeatureID = item.FeatureID,
             Feature = FeatureAPI.To(item.Feature),
             IsNew = item.IsNew
         });
     }
     else
     {
         return(null);
     }
 }
Exemple #4
0
 public static RequirementAPI From(Requirement item, bool includeTasks = true, bool includeComments = true)
 {
     if (item != null)
     {
         return(new RequirementAPI
         {
             ID = item.ID,
             Title = item.Title,
             Status = item.Status,
             Tasks = includeTasks && item.Tasks != null?TaskAPI.From(item.Tasks).ToList() : null,
                         Comments = includeComments && item.Comments != null?RequirementCommentAPI.From(item.Comments).ToList() : null,
                                        FeatureID = item.FeatureID,
                                        Feature = FeatureAPI.From(item.Feature, false),
                                        IsNew = item.IsNew
         });
     }
     else
     {
         return(null);
     }
 }
Exemple #5
0
 public static Task To(TaskAPI item, bool includeTaskLogs = true, bool includeComments = true)
 {
     if (item == null)
     {
         return(null);
     }
     else
     {
         return(new Task
         {
             ID = item.ID,
             Title = item.Title,
             TaskType = item.TaskType,
             IsActive = item.IsActive,
             CheckIns = TaskCheckInAPI.To(item.CheckIns),
             Logs = includeTaskLogs ? TaskLogAPI.To(item.Logs) : null,
             Comments = includeComments ? TaskCommentAPI.To(item.Comments) : null,
             RequirementID = item.RequirementID,
             Requirement = RequirementAPI.To(item.Requirement),
             IsNew = item.IsNew
         });
     }
 }