RunScript() public static method

Executes a script
Requires an active script context.
public static RunScript ( string script ) : EdgeJsValue
script string The script to run
return EdgeJsValue
        public override object Evaluate(string expression, string documentName)
        {
            object result = InvokeScript(() =>
            {
                EdgeJsValue resultValue = EdgeJsContext.RunScript(expression, _jsSourceContext++, documentName);

                return(MapToHostType(resultValue));
            });

            return(result);
        }
Example #2
0
        public override object Evaluate(string expression)
        {
            object result = InvokeScript(() =>
            {
                EdgeJsValue resultValue = EdgeJsContext.RunScript(expression);

                return(MapToHostType(resultValue));
            });

            return(result);
        }
 public override void Execute(string code, string documentName)
 {
     InvokeScript(() => EdgeJsContext.RunScript(code, _jsSourceContext++, documentName));
 }
Example #4
0
 public override void Execute(string code)
 {
     InvokeScript(() => EdgeJsContext.RunScript(code));
 }