public Rule2(IOptionsMonitor <Rule2Config> rule2Config, IOptionsMonitor <FilePathConfig> filePathConfig)//change later { _rule2Config = rule2Config.CurrentValue; _bSearchList = Helper.GetList(null, string.IsNullOrEmpty(_rule2Config.SearchStr1) ? "bB" : _rule2Config.SearchStr1); _eSearchList = Helper.GetList(null, string.IsNullOrEmpty(_rule2Config.SearchStr2) ? "eE" : _rule2Config.SearchStr2); _filePathConfig = filePathConfig.CurrentValue; _rule2ConfigUpdate = rule2Config; _filePathConfigUpdate = filePathConfig; }
public void UpdateConfig() { _rule2ConfigUpdate.OnChange(x => _rule2Config = x); _filePathConfigUpdate.OnChange(x => _filePathConfig = x); }