I used CalculationEngine to manage and calculate a group of express,like as:
var engine = new CalculationEngine();
var context = new ExpressionContext();
engine.Add("x", "2", context);
engine.Add("y", "sqrt(x)", context);
engine.Add("z", "y * 3", context);
And i want to update the "x", and it could update the referenced express auto...
I tried the following:
I used CalculationEngine to manage and calculate a group of express,like as:
var engine = new CalculationEngine(); var context = new ExpressionContext(); engine.Add("x", "2", context); engine.Add("y", "sqrt(x)", context); engine.Add("z", "y * 3", context);
And i want to update the "x", and it could update the referenced express auto... I tried the following:
engine.Remove("x"); engine.Add("x", "9", context); engine.GetResult("y")
there is a exception like as: System.ArgumentException:“No expression is associated with the name 'y'” So, How could i update the "x"?