public bool Equals(PeriodicallyHostedServiceOptions <TScheduledAction> other) { if (other == null || RunOnStart != other.RunOnStart || Frequency != other.Frequency || Period != other.Period) { return(false); } return(true); }
private async void ReloadOptions(PeriodicallyHostedServiceOptions <TScheduledAction> options) { if (_options == null || !_options.Equals(options)) { _options = options; if (_isStarted) { _scheduledActionTokenSource.Cancel(); await StartAsync(_HostedServiceTokenSource.Token); } } }