public static Object Execute(this ScriptSource aScriptSource, ESCompilerOptions compilerOptions, ErrorListener errorListener, ScriptScope scriptScope, Object[] arguments) { var compiledCode = aScriptSource.Compile(compilerOptions, errorListener); var essenceScriptCode = compiledCode.essenceScriptCode(); if (essenceScriptCode == null) { return(null); } return(essenceScriptCode.Run(scriptScope.scope(), arguments)); }
public static Object Execute(this ScriptSource aScriptSource, ScriptScope scriptScope, Object[] arguments) { var compiledCode = aScriptSource.Compile(); var essenceScriptCode = compiledCode.essenceScriptCode(); if (essenceScriptCode == null) { return(null); } return(essenceScriptCode.Run(scriptScope.scope(), arguments)); }
public static Object Execute(this ScriptSource aScriptSource, ESCompilerOptions compilerOptions, ErrorListener errorListener, ScriptScope scriptScope, Object[] arguments, out TimeSpan durationToRun) { var compiledCode = aScriptSource.Compile(compilerOptions, errorListener); var essenceScriptCode = compiledCode.essenceScriptCode(); if (essenceScriptCode == null) { durationToRun = TimeSpan.Zero; return(null); } var value = essenceScriptCode.Run(scriptScope.scope(), arguments); durationToRun = essenceScriptCode.DurationToRun; return(value); }