예제 #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));
        }
예제 #2
0
        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));
        }
예제 #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);
        }