Changeset 9363 for branches/OaaS/HeuristicLab.Services.Hive/3.3/Convert.cs
- Timestamp:
- 04/16/13 13:13:41 (11 years ago)
- Location:
- branches/OaaS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 23 24 packages
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/OaaS/HeuristicLab.Services.Hive
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/sources/HeuristicLab.Services.Hive merged eligible /branches/Algorithms.GradientDescent/HeuristicLab.Services.Hive 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Services.Hive 6917-7005 /branches/CloningRefactoring/HeuristicLab.Services.Hive 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Services.Hive 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Services.Hive 5815-6180 /branches/DataAnalysis/HeuristicLab.Services.Hive 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Services.Hive 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Services.Hive 5060 /branches/HiveTaskScheduler/HeuristicLab.Services.Hive 8687-9106 /branches/NET40/sources/HeuristicLab.Services.Hive 5138-5162 /branches/ParallelEngine/HeuristicLab.Services.Hive 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Services.Hive 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Services.Hive 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Services.Hive 6828 /branches/RuntimeOptimizer/HeuristicLab.Services.Hive 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Services.Hive 7787-8333 /branches/SlaveShutdown/HeuristicLab.Services.Hive 8944-8956 /branches/SuccessProgressAnalysis/HeuristicLab.Services.Hive 5370-5682 /branches/Trunk/HeuristicLab.Services.Hive 6829-6865 /branches/UnloadJobs/HeuristicLab.Services.Hive 9168-9215 /branches/VNS/HeuristicLab.Services.Hive 5594-5752 /branches/histogram/HeuristicLab.Services.Hive 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/OaaS/HeuristicLab.Services.Hive/3.3/Convert.cs
r7916 r9363 79 79 } 80 80 } 81 82 public static void ToEntityTaskOnly(DT.Task source, DB.Task target) { 83 if ((source != null) && (target != null)) { 84 target.TaskId = source.Id; 85 target.CoresNeeded = source.CoresNeeded; 86 target.ExecutionTimeMs = source.ExecutionTime.TotalMilliseconds; 87 target.MemoryNeeded = source.MemoryNeeded; 88 target.ParentTaskId = source.ParentTaskId; 89 target.Priority = source.Priority; 90 target.LastHeartbeat = source.LastHeartbeat; 91 target.State = Convert.ToEntity(source.State); 92 target.IsParentTask = source.IsParentTask; 93 target.FinishWhenChildJobsFinished = source.FinishWhenChildJobsFinished; 94 target.Command = Convert.ToEntity(source.Command); 95 // RequiredPlugins are added by Dao 96 target.JobId = source.JobId; 97 target.IsPrivileged = source.IsPrivileged; 98 } 99 } 81 100 #endregion 82 101 … … 118 137 public static DT.Downtime ToDto(DB.Downtime source) { 119 138 if (source == null) return null; 120 return new DT.Downtime { Id = source.DowntimeId, AllDayEvent = source.AllDayEvent, EndDate = source.EndDate, Recurring = source.Recurring, RecurringId = source.RecurringId, ResourceId = source.ResourceId, StartDate = source.StartDate };139 return new DT.Downtime { Id = source.DowntimeId, AllDayEvent = source.AllDayEvent, EndDate = source.EndDate, Recurring = source.Recurring, RecurringId = source.RecurringId, ResourceId = source.ResourceId, StartDate = source.StartDate, DowntimeType = source.DowntimeType }; 121 140 } 122 141 public static DB.Downtime ToEntity(DT.Downtime source) { … … 127 146 public static void ToEntity(DT.Downtime source, DB.Downtime target) { 128 147 if ((source != null) && (target != null)) { 129 target.DowntimeId = source.Id; target.AllDayEvent = source.AllDayEvent; target.EndDate = source.EndDate; target.Recurring = source.Recurring; target.RecurringId = source.RecurringId; target.ResourceId = source.ResourceId; target.StartDate = source.StartDate; 148 target.DowntimeId = source.Id; target.AllDayEvent = source.AllDayEvent; target.EndDate = source.EndDate; target.Recurring = source.Recurring; target.RecurringId = source.RecurringId; target.ResourceId = source.ResourceId; target.StartDate = source.StartDate; target.DowntimeType = source.DowntimeType; 130 149 } 131 150 } … … 527 546 } 528 547 #endregion 548 549 #region UserPriority 550 public static DT.UserPriority ToDto(DB.UserPriority source) { 551 if (source == null) return null; 552 return new DT.UserPriority() { Id = source.UserId, DateEnqueued = source.DateEnqueued }; 553 } 554 public static DB.UserPriority ToEntity(DT.UserPriority source) { 555 if (source == null) return null; 556 var entity = new DB.UserPriority(); ToEntity(source, entity); 557 return entity; 558 } 559 public static void ToEntity(DT.UserPriority source, DB.UserPriority target) { 560 if ((source != null) && (target != null)) { 561 target.UserId = source.Id; 562 target.DateEnqueued = source.DateEnqueued; 563 } 564 } 565 #endregion 529 566 } 530 567 }
Note: See TracChangeset
for help on using the changeset viewer.