[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]JScript embedded in C# !!
From: |
Rhys Weatherley |
Subject: |
Re: [DotGNU]JScript embedded in C# !! |
Date: |
Wed, 15 Jan 2003 08:31:31 +1000 |
User-agent: |
KMail/1.4.3 |
On Wednesday 15 January 2003 05:07 am, Gopal V wrote:
> Perhaps not the longest Hello World program , but a Hello World
> it is ... :)
And it's about the only script that works right now. :-)
But yes, JScript embedding is definitely going to be with us soon. The file
"pnetlib/doc/JScript-embed.txt" describes the procedure.
> $ cscc -lSystem -lMicrosoft.Vsa -lMicrosoft.JScript
>
> Any similarities to jsrun.cs is perfectly natural ;)
It may be useful to create a small helper class that wraps up all the nasty
VsaEngine stuff and exports the following:
class JScriptEngine
{
// Load and run a script.
public void RunScript(String script) { ... }
public void RunScript(TextReader script) { ... }
// Evaluate an expression in the context of the loaded script.
public Object Eval(String expr) { ... }
// Reset and prepare for a new script.
void Reset() { ... }
}
Perhaps something in the "pnetlib/samples" directory?
Cheers,
Rhys.