Exemple #1
0
        internal HangfireConfiguration(ApplicationConfiguration application)
        {
            if (application == null)
            {
                throw new ArgumentNullException(nameof(application));
            }

            Application = application
                          .Hosts(hosts => hosts.Host <HangfireHost>());

            _configuration       = new InternalConfiguration();
            _backgroundProcesses = new ScanAddRemoveInstaller <IBackgroundProcess>();
        }
        public HangfireServerImpl(IKernel kernel, InternalConfiguration configuration)
        {
            if (kernel == null)
            {
                throw new ArgumentNullException(nameof(kernel));
            }
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            _kernel        = kernel;
            _configuration = configuration;

            Execute(_configuration.OnStartup);

            JobActivator.Current = configuration.ServerOptions.Activator;

            IBackgroundProcess[] backgroundProcesses = kernel.ResolveAll <IBackgroundProcess>();

            _server = new BackgroundJobServer(configuration.ServerOptions, JobStorage.Current, backgroundProcesses);
        }
Exemple #3
0
 public HangfireServerFactory(IKernel kernel, InternalConfiguration configuration)
 {
     _kernel        = kernel ?? throw new ArgumentNullException(nameof(kernel));
     _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
 }
Exemple #4
0
 public DelegatingJobStorage(IWindsorContainer container, InternalConfiguration configuration)
 {
     _container     = container;
     _configuration = configuration;
 }