public static IServiceCollection AddJobServer(this IServiceCollection services, Action <JobBuilderOptions> setup)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            if (setup == null)
            {
                throw new ArgumentNullException(nameof(setup));
            }

            var opts = new JobBuilderOptions(services);

            setup?.Invoke(opts);
            services.AddSingleton(opts);

            return(services);
        }
Beispiel #2
0
 public HomeController(JobBuilderOptions options)
 {
     _options = options;
 }