void Process(string command, string[] args, ref MathParserExpression theSolution) { MathParser.Solver sol = makeMathParserSolverObject(); sol.SaveHistory(); if (command == "eval") { foreach (var x in args) { sol.setMathExpression(x); sol.Solve(); } theSolution = sol.getSolution(); return; } throw new MathParserException("Keyword does not exist"); }
MathParser.Solver makeMathParserSolverObject() { MathParser.Solver sol = new MathParser.Solver(); OnMathParserOverDriveSolverCreate?.Invoke(ref sol); return(sol); }