示例#1
0
文件: JobDb.cs 项目: wite27/Horarium
 public JobMetadata ToJob(JsonSerializerSettings jsonSerializerSettings)
 {
     return(new JobMetadata
     {
         JobId = JobId,
         JobKey = JobKey,
         Status = Status,
         CountStarted = CountStarted,
         StartedExecuting = StartedExecuting,
         ExecutedMachine = ExecutedMachine,
         JobType = Type.GetType(JobType, true),
         JobParam = JobParam?.FromJson(Type.GetType(JobParamType), jsonSerializerSettings),
         StartAt = StartAt,
         NextJob = NextJob?.ToJob(jsonSerializerSettings),
         Cron = Cron,
         Delay = Delay,
         ObsoleteInterval = ObsoleteInterval
     });
 }
示例#2
0
 public JobMetadata ToJob(JsonSerializerSettings jsonSerializerSettings)
 {
     return(new JobMetadata
     {
         JobId = JobId,
         JobKey = JobKey,
         Status = Status,
         CountStarted = CountStarted,
         StartedExecuting = StartedExecuting,
         ExecutedMachine = ExecutedMachine,
         JobType = Type.GetType(JobType, true),
         JobParam = JobParam?.FromJson(Type.GetType(JobParamType), jsonSerializerSettings),
         StartAt = StartAt,
         NextJob = NextJob?.ToJob(jsonSerializerSettings),
         Cron = Cron,
         Delay = Delay,
         ObsoleteInterval = ObsoleteInterval,
         RepeatStrategy = string.IsNullOrEmpty(RepeatStrategy) ? null : Type.GetType(RepeatStrategy, true),
         MaxRepeatCount = MaxRepeatCount
     });
 }