- Timestamp:
- 01/18/18 15:08:25 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Converter.cs
r15628 r15630 121 121 OwnerUserId = source.OwnerUserId, 122 122 DateCreated = source.DateCreated, 123 ProjectId = source.ProjectId 123 ProjectId = source.ProjectId, 124 State = source.State.ToDto() 124 125 }; 125 126 } … … 140 141 target.DateCreated = source.DateCreated; 141 142 target.ProjectId = source.ProjectId; 143 target.State = source.State.ToEntity(); 142 144 } 143 145 #endregion … … 242 244 #endregion 243 245 244 #region State246 #region TaskState 245 247 public static DT.TaskState ToDto(this DA.TaskState source) { 246 248 switch (source) { … … 268 270 case DT.TaskState.Waiting: return DA.TaskState.Waiting; 269 271 default: return DA.TaskState.Failed; 272 } 273 } 274 #endregion 275 276 #region JobState 277 public static DT.JobState ToDto(this DA.JobState source) { 278 switch (source) { 279 case DA.JobState.Online: return DT.JobState.Online; 280 case DA.JobState.StatisticsPending: return DT.JobState.StatisticsPending; 281 case DA.JobState.DeletionPending: return DT.JobState.DeletionPending; 282 default: return DT.JobState.Online; 283 } 284 } 285 286 public static DA.JobState ToEntity(this DT.JobState source) { 287 switch (source) { 288 case DT.JobState.Online: return DA.JobState.Online; 289 case DT.JobState.StatisticsPending: return DA.JobState.StatisticsPending; 290 case DT.JobState.DeletionPending: return DA.JobState.DeletionPending; 291 default: return DA.JobState.Online; 270 292 } 271 293 }
Note: See TracChangeset
for help on using the changeset viewer.