public static IJobRegistrator RegiserJob <TJob>( this IJobRegistrator jobRegistrator, Func <IEnumerable <TriggerBuilder> > triggers) where TJob : class, IJob { return(jobRegistrator.RegiserJob <TJob>(triggers())); }
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()) )); }