Exemple #1
0
        internal static Application bootDover(Application doverApp)
        {
            if (bootDoverHelper != null)
            {
                throw new Exception("Dover is running");
            }

            bootDoverHelper = new BootDoverHelper(doverApp);
            Thread t = new Thread(bootDoverHelper.Start);

            bootDoverHelper.bootThread = t;
            t.SetApartmentState(ApartmentState.STA);
            t.Start();

            int count = 0;

            while (bootDoverHelper.app == null || !bootDoverHelper.app.Initialized)
            {
                Thread.Sleep(5000);
                if (count >= 60)
                {
                    throw new Exception("5 minutes connection timeout");
                }
                ++count;
            }

            return(bootDoverHelper.app);
        }
Exemple #2
0
        internal static void shutdownDover()
        {
            if (bootDoverHelper != null)
            {
                bootDoverHelper.Shutdown();
                bootDoverHelper = null;
            }
            var domains = DomainHelper.LoadedDomains;

            Assert.AreEqual(2, domains.Count());
        }
Exemple #3
0
        internal static Application bootDover(Application doverApp)
        {
            if (bootDoverHelper != null)
                throw new Exception("Dover is running");

            bootDoverHelper = new BootDoverHelper(doverApp);
            Thread t = new Thread(bootDoverHelper.Start);
            bootDoverHelper.bootThread = t;
            t.SetApartmentState(ApartmentState.STA);
            t.Start();

            int count = 0;
            while (bootDoverHelper.app == null || !bootDoverHelper.app.Initialized)
            {
                Thread.Sleep(5000);
                if (count >= 60)
                    throw new Exception("5 minutes connection timeout");
                ++count;
            }

            return bootDoverHelper.app;
        }
Exemple #4
0
 internal static void shutdownDover()
 {
     if (bootDoverHelper != null)
     {
         bootDoverHelper.Shutdown();
         bootDoverHelper = null;
     }
     var domains = DomainHelper.LoadedDomains;
     Assert.AreEqual(2, domains.Count());
 }