static JobScheduler() { _isInit = Global.IsInit; if (!_isInit) return; _options = Global.Configuration.Options; _repository = Global.Repository; _executor = Global.Executor; _logger = Global.Logger; _repository?.SetLogger(_logger); _queues = _options.Queues .Select(x => new JobQueue(x, _repository, _executor, _logger)) .ToDictionary(x => x.Name); }
public void UseOptions(SchedulerOptions options) { Options = options ?? throw new ArgumentNullException(nameof(options)); }