Exemple #1
0
 public Rule4(IOptionsMonitor <Rule4Config> rule4Config, IOptionsMonitor <FilePathConfig> filePathConfig)//change later
 {
     _rule4Config          = rule4Config.CurrentValue;
     _cSearchList          = Helper.GetList(null, string.IsNullOrEmpty(_rule4Config.SearchStr1) ? "cC" : _rule4Config.SearchStr1);
     _aSearchList          = Helper.GetList(null, string.IsNullOrEmpty(_rule4Config.SearchStr2) ? "aA" : _rule4Config.SearchStr2);
     _filePathConfig       = filePathConfig.CurrentValue;
     _rule4ConfigUpdate    = rule4Config;
     _filePathConfigUpdate = filePathConfig;
 }
Exemple #2
0
 public void UpdateConfig()
 {
     _rule4ConfigUpdate.OnChange(x => _rule4Config       = x);
     _filePathConfigUpdate.OnChange(x => _filePathConfig = x);
 }