示例#1
0
 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;
 }
示例#2
0
 public void UpdateConfig()
 {
     _rule2ConfigUpdate.OnChange(x => _rule2Config       = x);
     _filePathConfigUpdate.OnChange(x => _filePathConfig = x);
 }