public Evaluator(Evaluator theEvaluator)
        {
            ICodeCompiler compiler;
            compiler = new JScriptCodeProvider().CreateCompiler();

            CompilerParameters parameters;
            parameters = new CompilerParameters();
            parameters.GenerateInMemory = true;

            CompilerResults results;
            results = compiler.CompileAssemblyFromSource(parameters, _jscriptSource);

            Assembly assembly = results.CompiledAssembly;
            _evaluatorType = assembly.GetType("EvaluatorNS.Evaluator");
            //_evaluatorCtxType = assembly.GetType("Evaluator.Context");
            _evaluator = Activator.CreateInstance(_evaluatorType);

            // create a new form instance
            // _scriptableForm = new ScriptableForm();

            // create a new set of hosts
            lock (hosts)
            {
                string rootMoniker = string.Format("{0}://{1}", rootHostName, Guid.NewGuid().ToString());
                _host = new VsaScriptingHost(VsaScriptingLanguages.JScript, "Evaluator", rootMoniker,
                                             _evaluatorType.Namespace, true);
                Engine = (VsaEngine)(object)_host.Engine;
                globalScope = Engine.GetGlobalScope();
                thisGlobalObj = Microsoft.JScript.Eval.JScriptEvaluate("this;", Engine) as GlobalScope;
                hosts.Add(_host);
                _host.AddType(typeof(System.Object));
                _host.AddType(typeof(System.String));
                AddGlobalItem("$engine", Engine);
                AddGlobalItem("$superE", theEvaluator);
                // hosts.AddRange(HostFactory.Create(@"MyScriptingHost", @"Scripting", true, Environment.CurrentDirectory));                
            }

            // wire up to the events of each host
            foreach (VsaScriptingHost host in hosts)
            {
                host.AssemblyReferencesNeeded += new ScriptingHostEventHandler(OnAssemblyReferencesNeeded);
                host.CompilerException += new ScriptingHostCompilerExceptionEventHandler(OnCompilerException);
                host.GlobalItemsNeeded += new ScriptingHostEventHandler(OnGlobalItemsNeeded);
            }

            // execute the hosts
            foreach (VsaScriptingHost host in hosts)
                host.Execute();


            // show the form
            //_scriptableForm.ShowDialog();

        }
        /// <summary>
        /// Creates a VsaScriptingHost from a FileInfo object
        /// </summary>
        /// <param name="info"></param>
        /// <param name="rootHostName"></param>
        /// <param name="rootNamespace"></param>
        /// <param name="generateDebugInfo"></param>
        /// <returns></returns>
        protected VsaScriptingHost FromFileInfo(FileInfo info, string rootHostName, string rootNamespace, bool generateDebugInfo)
        {
            // determine if we can use the file based upon it's extention
            VsaScriptingLanguages language;
            if (this.SelectLanguageBasedOnExtension(info, out language))
            {
                // format the root moniker that will be used by this scripting host
                string rootMoniker = string.Format("{0}://{1}", rootHostName, Guid.NewGuid().ToString());

                // create a host
                VsaScriptingHost host = new VsaScriptingHost(language, rootHostName, rootMoniker, rootNamespace, true);

                // and return it
                return host;
            }

            return null;
        }
 /// <summary>
 /// Initializes a new instance of the VsaScriptingHostEventArgs class
 /// </summary>
 /// <param name="host"></param>
 public VsaScriptingHostEventArgs(VsaScriptingHost host)
 {
     _host = host;
 }