[Mono-vb] VsaEngine implementation.

César López Natarén cesar@ciencias.unam.mx
Tue, 16 Dec 2003 10:37:10 -0600

On Tue, 2003-12-16 at 15:30, Anony Mous wrote:
> Hi CĂ©sar,

> What exactly is a VsaEngine? I have looked around the net and it seems 
> to point to something in the Longhorn SDK, which is currently incomplete 
> and has little info on the subject. Can you expand on this a little
> please?

The VsaEngine, which comes from "Visual Studio for Applications",
is the mechanism that offer scripting capabilities to .Net (although it existed before .Net too).

They way VSA works is:

1) We have a host, our application. The host implements a interface, IVsaSite.
2) We have scriting execution machine (the VsaEngine), which implements the interface IVsaEngine.  

and communication is passed through the methods implementations from those interfaces.

And basically what the VsaEngine does is, take a source file or an assembly and compiles/execute it.

>From what I've been able to see that the JScript VsaEngine does is: taking=
 care of the 
runtime supprt for assemblies generated by jsc. Basically, takes care of the global 
environment (types, functions, prototypes which are available) and the differents environments created 
on the course of the program execution. 

The code used for IVsaSite and IVsaEngine, is not difficult, I already have some 
chunks written at mcs/class/Microsoft.JScript/Microsoft.JScript/Vsa*.cs
but the one for environments, is a little strange, also I have not found docs.

I think lot's of code can be shared in this one, and also some discussion will help us understand
this thing.