public JavaScriptModule(Context context, string code, string path) : base(context) { Code = code; Path = path; Initialize(); }
static void Main(string[] args) { Context = new Context(); Context.Fs.Chroot = Context.Process.Instance.Cwd(); Module main = new JavaScriptModule(Context, "tests/test.js"); Context.Run(main); Thread t = new Thread(new ThreadStart(Run)); t.Start(); }
public JavaScriptModule(Context context, string path) : base(context) { Path = context.Path.Resolve(path); StreamReader sr = File.OpenText(path); try { Code = sr.ReadToEnd(); } finally { sr.Close(); } Initialize(); }
public ContextGlobalObject(Context context) : base(context.Engine.Object.InstancePrototype) { }