예제 #1
0
 public static IJobRegistrator RegiserJob <TJob>(
     this IJobRegistrator jobRegistrator,
     Func <IEnumerable <TriggerBuilder> > triggers)
     where TJob : class, IJob
 {
     return(jobRegistrator.RegiserJob <TJob>(triggers()));
 }
예제 #2
0
        public static IJobRegistrator RegiserCRONJob <TJob>(
            this IJobRegistrator jobRegistrator,
            Action <JobOptions> jobOptions)
            where TJob : class, IJob
        {
            var options = new JobOptions();

            jobOptions?.Invoke(options);

            return(jobRegistrator.RegiserJob <TJob>(
                       options.Triggers?.Select(n => n.CreateTriggerBuilder())
                       ));
        }