コード例 #1
0
        public static Job ToDomain(this JobDto job, IJobConfigurationMapper mapper)
        {
            if (job == null)
            {
                return(null);
            }

            return(new Job()
            {
                Name = job.Name,
                Description = job.Description,
                ConcurrentLimit = job.ConcurrentLimit,
                Enabled = job.Enabled,
                LastUpdated = job.LastUpdated,
                TriggerCronSyntax = job.TriggerCronSyntax,
                Configuration = mapper.Deserialize(job.Configuration)
            });
        }
コード例 #2
0
        public static Job ToDomain(this JobModel model, IJobConfigurationMapper configMapper)
        {
            if (model == null)
            {
                return(null);
            }

            return(new Job
            {
                Name = model.Name,
                Description = model.Description,
                ConcurrentLimit = model.ConcurrentLimit,
                Enabled = model.Enabled,
                //JobType = model.JobType,
                TriggerCronSyntax = model.TriggerCronSyntax,
                Configuration = configMapper.Deserialize(model.Configuration),
                LastUpdated = model.LastUpdated
            });
        }