[Mono-vb] VsaEngine implementation.

A Rafael D Teixeira rafael.teixeirabr@terra.com.br
Wed, 17 Dec 2003 11:36:07 -0200

On Tue, 2003-12-16 at 14:37, César López Natarén wrote:
> On Tue, 2003-12-16 at 15:30, Anony Mous wrote:
> > Hi César,
> Hi!
> > 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.

Is it a .NET or a COM Interface? If it is COM, we would have to make the
wrapping and all the COM Interop things that are nearly meaningless in

> 2) We have scriting execution machine (the VsaEngine), which implements the interface IVsaEngine.  

Same question.

> 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.

These itens are documented only for partners of M$ that already paid
lots of money for the right to make things that can be embedded in
Office/VisualStudio. NDAs apply.

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

Surely, all but some language-specific bits can be factored into some
common classes.
> César

Rafael Teixeira 
Brazilian Polymath 
Mono Hacker since 16 Jul 2001 
Mono Brasil Founding Member
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/