/// <summary> /// Initializes a new instance of the <see cref="BackgroundJobClient"/> class /// with a specified job storage and job creation process. /// </summary> /// /// <exception cref="ArgumentNullException"><paramref name="storage"/> argument is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="process"/> argument is null.</exception> public BackgroundJobClient(JobStorage storage, IJobCreationProcess process) { if (storage == null) throw new ArgumentNullException("storage"); if (process == null) throw new ArgumentNullException("process"); _connection = storage.GetConnection(); _process = process; }
public RecurringJobManager([NotNull] JobStorage storage, [NotNull] IBackgroundJobClient client) { if (storage == null) throw new ArgumentNullException("storage"); if (client == null) throw new ArgumentNullException("client"); _storage = storage; _client = client; }
public BackgroundJobServer(BackgroundJobServerOptions options, JobStorage storage) { if (options == null) throw new ArgumentNullException("options"); if (storage == null) throw new ArgumentNullException("storage"); _options = options; _storage = storage; _serverId = String.Format("{0}:{1}", _options.ServerName.ToLowerInvariant(), Process.GetCurrentProcess().Id); // ReSharper disable once DoNotCallOverridableMethodsInConstructor _bootstrapSupervisor = GetBootstrapSupervisor(); }
/// <summary> /// Initializes a new instance of the <see cref="BackgroundJobClient"/> class /// with a specified job storage and job creation process. /// </summary> /// /// <exception cref="ArgumentNullException"><paramref name="storage"/> argument is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="process"/> argument is null.</exception> public BackgroundJobClient( JobStorage storage, IStateMachineFactory stateMachineFactory, IJobCreationProcess process) { if (storage == null) throw new ArgumentNullException("storage"); if (stateMachineFactory == null) throw new ArgumentNullException("stateMachineFactory"); if (process == null) throw new ArgumentNullException("process"); _storage = storage; _stateMachineFactory = stateMachineFactory; _process = process; }
public BackgroundJobClient(JobStorage storage, IStateMachineFactory stateMachineFactory) : this(storage, stateMachineFactory, JobCreationProcess.Instance) { }
/// <summary> /// Initializes a new instance of the <see cref="BackgroundJobClient"/> class /// with a specified storage and the default global /// <see cref="JobCreationProcess"/> instance. /// </summary> public BackgroundJobClient(JobStorage storage) : this(storage, new StateMachineFactory(storage)) { }
public void UseStorage(JobStorage storage) { Storage = storage; }
/// <summary> /// Initializes a new instance of the <see cref="BackgroundJobClient"/> class /// with a specified storage and the default global /// <see cref="JobCreationProcess"/> instance. /// </summary> public BackgroundJobClient(JobStorage storage) : this(storage, JobCreationProcess.Instance) { }