public bool Equals(PeriodicallyHostedServiceOptions <TScheduledAction> other)
 {
     if (other == null || RunOnStart != other.RunOnStart || Frequency != other.Frequency || Period != other.Period)
     {
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        private async void ReloadOptions(PeriodicallyHostedServiceOptions <TScheduledAction> options)
        {
            if (_options == null || !_options.Equals(options))
            {
                _options = options;

                if (_isStarted)
                {
                    _scheduledActionTokenSource.Cancel();
                    await StartAsync(_HostedServiceTokenSource.Token);
                }
            }
        }