Пример #1
0
 private void CreateScriptEngine()
 {
     if (this.FEngine != null)
     {
         return;
     }
     this.FEngine = (IActiveScript)Activator.CreateInstance(Type.GetTypeFromProgID(this.Language));
     this.FParser = new ActiveScriptParseWrapper((object)this.FEngine);
     this.FEngine.SetScriptSite((IActiveScriptSite)this);
     this.FParser.InitNew();
 }
Пример #2
0
 public void Close()
 {
     if (this.FEngine != null)
     {
         this.FEngine.Close();
         Marshal.ReleaseComObject((object)this.FEngine);
         this.FEngine = (IActiveScript)null;
     }
     if (this.FParser != null)
     {
         this.FParser.Dispose();
         this.FParser = (ActiveScriptParseWrapper)null;
     }
     if (this.FCodeObject != null)
     {
         Marshal.ReleaseComObject(this.FCodeObject);
         this.FCodeObject = (object)null;
     }
     this.FSourceContexts.Clear();
     this.FNamedObjects.Clear();
     this.Error.Clear();
 }