public DefaultCompiledRuleStore( ILexer lexer, IParser parser, IInterpreter interpreter, IRuleStore ruleStore) { if (lexer == null) { throw new ArgumentNullException(nameof(lexer)); } if (parser == null) { throw new ArgumentNullException(nameof(parser)); } if (interpreter == null) { throw new ArgumentNullException(nameof(interpreter)); } if (ruleStore == null) { throw new ArgumentNullException(nameof(ruleStore)); } _lexer = lexer; _parser = parser; _interpreter = interpreter; _ruleStore = ruleStore; }
/// <summary> /// Initializes a new instance of the <see cref="RuleManager"/> class. /// </summary> /// <param name="store">The store that the <see cref="RuleManager" /> operates against.</param> public RuleManager(IRuleStore store) { if (store == null) { throw new ArgumentNullException(nameof(store)); } Store = store; }
/// <summary> /// If disposing, calls dispose on the Context. Always nulls out the Context /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources</param> protected virtual void Dispose(bool disposing) { if (disposing && Store != null) { // Store.Dispose(); } _disposed = true; Store = null; }
public DefaultCompiledRuleStore(IRuleStore ruleStore) : this(new DefaultLexer(), new DefaultParser(), new DefaultInterpreter(), ruleStore) { }
public RuleEngine(IRuleStore pool, IRuleEvaluationStrategy strategy) { _pool = pool; _strategy = strategy; }
public RuleEngine(IRuleStore pool) : this(pool, new SimpleRuleEvaluationStrategy()) { }
public RuleBookBuilder() { _ruleStore = ComponentFactory.Instance.Create <IRuleStore>(); }
public RuleEngine(IRuleStore store) { _store = store; }
public TestRuleStore() { _ruleStore = new DefaultRuleStore(); }