예제 #1
0
 public RulesEngine(ILogger logger = null, ReSettings reSettings = null)
 {
     _logger               = logger ?? new NullLogger <RulesEngine>();
     _reSettings           = reSettings ?? new ReSettings();
     _ruleExpressionParser = new RuleExpressionParser(_reSettings);
     _ruleParamCompiler    = new ParamCompiler(_reSettings, _ruleExpressionParser);
     _ruleCompiler         = new RuleCompiler(new RuleExpressionBuilderFactory(_reSettings, _ruleExpressionParser), _logger);
     _actionFactory        = new ActionFactory(GetActionRegistry(_reSettings));
 }
예제 #2
0
 public RulesEngine(ILogger logger, ReSettings reSettings = null)
 {
     _logger           = logger ?? new NullLogger <RulesEngine>();
     _reSettings       = reSettings ?? new ReSettings();
     ruleParamCompiler = new ParamCompiler(new RuleExpressionBuilderFactory(_reSettings), _logger);
 }