public Rule1(IOptionsMonitor <Rule1Config> rule1Config, IOptionsMonitor <FilePathConfig> filePathConfig)//change later { _rule1Config = rule1Config.CurrentValue; _aSearchList = Helper.GetList(null, string.IsNullOrEmpty(_rule1Config.SearchStr1) ? "aA" : _rule1Config.SearchStr1); _filePathConfig = filePathConfig.CurrentValue; _rule1ConfigUpdate = rule1Config; _filePathConfigUpdate = filePathConfig; }
public void UpdateConfig() { _rule1ConfigUpdate.OnChange(x => _rule1Config = x); _filePathConfigUpdate.OnChange(x => _filePathConfig = x); }