public bool SatisfiesFormula(Formula formula) { VariableCollection variable = _expressionContext.Variables; foreach (var statu in _status) { variable.Add(statu.Key.ToString() , statu.Value); } bool eval = _expressionContext.CompileGeneric<bool>(formula.Expression).Evaluate(); variable.Clear(); return eval; }
public void InitializeFormula() { Formula = new Formula(); }