private JobsOptions CreateOptionsWithRegistry(CronJobRegistry registry)
        {
            var options = new JobsOptions();

            options.UseCronJobRegistry(registry);
            return(options);
        }
 private CronJob[] GetCronJobsFromRegistry(CronJobRegistry registry)
 {
     return(registry.Build().Select(j => new CronJob()
     {
         Cron = j.Cron,
         Name = j.Name,
         TypeName = j.JobType.AssemblyQualifiedName
     }).ToArray());
 }
        /// <summary>
        /// Sets the <see cref="CronJobRegistry"/> to use.
        /// </summary>
        /// <param name="registry">The <see cref="CronJobRegistry"/>.</param>
        public void UseCronJobRegistry(CronJobRegistry registry)
        {
            if (registry == null)
            {
                throw new ArgumentNullException(nameof(registry));
            }

            CronJobRegistry = registry;
        }
示例#4
0
 /// <summary>
 /// Sets the <see cref="CronJobRegistry"/> to use.
 /// </summary>
 /// <param name="registry">The <see cref="CronJobRegistry"/>.</param>
 public void UseCronJobRegistry(CronJobRegistry registry)
 {
     CronJobRegistry = registry ?? throw new ArgumentNullException(nameof(registry));
 }