public static object Eval(string Script, jsObject Context = null) { var Eng = new Engine(); if (Eng.Parse(Script)) { if (Context == null) { Context = new jsObject(); } return(Eng.Evaluate(Context)); } return(null); }
static void Main(string[] args) { App.Init(Log.Levels.Info, args); var Engine = new Script.Engine(); var Context = new jsObject(); if (File.Exists("Config.psx")) { if (Engine.Parse(File.ReadAllText("Config.psx"))) { Engine.Evaluate(Context); } } App.WaitforExit(); }