Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public static Object Execute(this ScriptSource aScriptSource, ESCompilerOptions compilerOptions, Object[] arguments)
        {
            var compiledCode      = aScriptSource.Compile(compilerOptions);
            var essenceScriptCode = compiledCode.essenceScriptCode();

            if (essenceScriptCode == null)
            {
                return(null);
            }
            return(essenceScriptCode.Run(arguments));
        }
Ejemplo n.º 3
0
        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);
        }