Microsoft.JScript.VsaStaticCode.Run C# (CSharp) Method

Run() private method

private Run ( ) : void
return void
      internal override void Run() {
        if (this.compiledClass != null) {
          GlobalScope scriptBlockScope = (GlobalScope)Activator.CreateInstance(this.GetCompiledType(), new Object[]{this.engine.GetGlobalScope().GetObject()});
          this.engine.Globals.ScopeStack.Push(scriptBlockScope);
          try {
            MethodInfo main = this.compiledClass.GetMethod("Global Code");
            try{
              main.Invoke(scriptBlockScope, null);
            }catch(TargetInvocationException e){
              throw e.InnerException;
            }
          }finally{
            this.engine.Globals.ScopeStack.Pop();
          }
        }
      }