public TorahQuoteJob(IOptions <TorahSettings> options, TorahService service)
 {
     _options       = options.Value;
     CronSchedule   = _options.CronSchedule; //set to 1 min in appsettings.json
     RunImmediately = true;
     _service       = service;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TorahQuoteJob"/> class.
 /// </summary>
 /// <param name="options"></param>
 /// <param name="service"></param>
 /// <param name="torahVerses"></param>
 public TorahQuoteJob(
     IOptionsMonitor <TorahQuoteJobOptions> options,
     TorahService service,
     TorahVerses torahVerses)
 {
     _options     = options.Get(Name);
     _service     = service ?? throw new ArgumentNullException(nameof(service));
     _torahVerses = torahVerses ?? throw new ArgumentNullException(nameof(torahVerses));
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TorahQuoteJob"/> class.
 /// </summary>
 /// <param name="options"></param>
 /// <param name="service"></param>
 /// <param name="torahVerses"></param>
 public TorahQuoteJob(
     IOptionsMonitor <TorahQuoteJobOptions> options,
     TorahService service,
     TorahVerses torahVerses) : base(options.CurrentValue)
 {
     _options     = options.CurrentValue;
     _service     = service ?? throw new ArgumentNullException(nameof(service));
     _torahVerses = torahVerses ?? throw new ArgumentNullException(nameof(torahVerses));
 }
예제 #4
0
 public TorahQuoteJob(
     IOptionsMonitor <TorahSettings> options,
     TorahService service,
     TorahVerses torahVerses)
 {
     _options       = options.CurrentValue;
     CronSchedule   = _options.CronSchedule; //set to 10 seconds in appsettings.json
     RunImmediately = _options.RunImmediately;
     CronTimeZone   = _options.CronTimeZone;
     _service       = service;
     _torahVerses   = torahVerses;
 }