/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="TestCaseExecutionDTO"/> converted from <see cref="TestCaseExecution"/>.</param> partial static void OnDTO(this TestCaseExecution entity, TestCaseExecutionDTO dto);
/// <summary> /// Converts this instance of <see cref="TestCaseExecution"/> to an instance of <see cref="TestCaseExecutionDTO"/>. /// </summary> /// <param name="entity"><see cref="TestCaseExecution"/> to convert.</param> public static TestCaseExecutionDTO ToDTO(this TestCaseExecution entity) { if (entity == null) return null; var dto = new TestCaseExecutionDTO(); dto.ExecutionId = entity.ExecutionId; dto.TestCaseId = entity.TestCaseId; dto.JobId = entity.JobId; dto.Status = entity.Status; dto.StartTime = (entity.StartTime==null)?null:((DateTime)entity.StartTime).ToUniversalTime().ToString(); dto.EndTime = (entity.EndTime==null)?null:((DateTime)entity.EndTime).ToUniversalTime().ToString(); dto.RetryTimes = entity.RetryTimes; dto.Info = entity.Info; entity.OnDTO(dto); return dto; }