コード例 #1
0
        public static JobRun ApplyTo(this ComponentModel.JobStorage.Model.JobRun src, JobRun targetEntity)
        {
            targetEntity.Id = src.Id > 0 ? $"{JobRun.CollectionPrefix}/{src.Id}" : null;
            targetEntity.ActualEndDateTimeUtc    = src.ActualEndDateTimeUtc;
            targetEntity.ActualStartDateTimeUtc  = src.ActualStartDateTimeUtc;
            targetEntity.EstimatedEndDateTimeUtc = src.EstimatedEndDateTimeUtc;
            targetEntity.InstanceParameters      = src.InstanceParameters;
            targetEntity.JobParameters           = src.JobParameters;
            targetEntity.Pid = src.Pid;
            targetEntity.PlannedStartDateTimeUtc = src.PlannedStartDateTimeUtc;
            targetEntity.Progress = src.Progress;
            targetEntity.State    = (JobRunStates)src.State;

            return(targetEntity);
        }
コード例 #2
0
 public static JobRun ToEntity(this ComponentModel.JobStorage.Model.JobRun src, Job job)
 {
     return(new JobRun
     {
         Id = src.Id > 0 ? $"{JobRun.CollectionPrefix}/{src.Id}" : null,
         Job = job,
         ActualEndDateTimeUtc = src.ActualEndDateTimeUtc,
         ActualStartDateTimeUtc = src.ActualStartDateTimeUtc,
         EstimatedEndDateTimeUtc = src.EstimatedEndDateTimeUtc,
         InstanceParameters = src.InstanceParameters,
         JobParameters = src.JobParameters,
         Pid = src.Pid,
         PlannedStartDateTimeUtc = src.PlannedStartDateTimeUtc,
         Progress = src.Progress,
         State = (JobRunStates)src.State
     });
 }