TestStand OperatorInterface 啟動源碼


    private static void LaunchHelper(
      LaunchTestStandApplicationInNewDomain.MainEntryPointDelegate entryPoint,
      LaunchTestStandApplicationInNewDomain.MainEntryPointDelegateWithArgs entryPointWithArgs,
      string[] args,
      bool parseArgs)
    {
      if (parseArgs)
        LaunchTestStandApplicationInNewDomain.SetEngineEnvironment(TSHelper.ParseEnvironmentPathFromArgs(ref args, false, (string) null));
      Engine engine = (Engine) new EngineClass();
      try
      {
        AppDomain domain = AppDomain.CreateDomain("TestStandAppDomain");
        LaunchTestStandApplicationInNewDomain.TestStandApplication instanceFromAndUnwrap = domain.CreateInstanceFromAndUnwrap(Assembly.GetExecutingAssembly().Location, typeof (LaunchTestStandApplicationInNewDomain.TestStandApplication).FullName) as LaunchTestStandApplicationInNewDomain.TestStandApplication;
        if (entryPoint != null)
          instanceFromAndUnwrap.CallEntryPoint(entryPoint);
        else
          instanceFromAndUnwrap.CallEntryPoint(entryPointWithArgs, args);
        AppDomain.Unload(domain);
      }
      finally
      {
        LaunchTestStandApplicationInNewDomain.CleanUpAfterNewAppDomainFinished(engine);
      }
    }

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM