public bool Evaluate(TInput input, string code, string filename = "") { try { ResetEngine(input); dynamic result = Engine.Evaluate("Script", true, code); return(result is bool?result : false); } catch (ScriptEngineException e) { ThrowScriptEngineException(filename, e); } return(false); }
public bool Evaluate(RenderChain.RenderChain chain, IFilter input, string code, string filename = "") { try { ResetEngine(chain, input); dynamic result = m_Engine.Evaluate("RenderScript", true, code); return(result is bool?result : false); } catch (ScriptEngineException e) { ThrowScriptEngineException(filename, e); } return(false); }