public void test_openCirDataControlUsingLocalWcfHost()
        {
            O2WcfUtils.createWcfHostForThisO2KernelProcess();
            IO2WcfKernelMessage o2WcfProxy = O2WcfUtils.getClientProxyForThisO2KernelProcess();
            var ascxControlName            = "Cir Analysis";

            Assert.That(o2WcfProxy.allOK(), "o2WcfProxy.allOK() returned false");
            DI.log.info("o2WcfProxy.allOK() = {0}", o2WcfProxy.allOK());
            Assert.That(Processes.getCurrentProcessID() == o2WcfProxy.getO2KernelProcessId(), "Processes ID should be the same");

            o2WcfProxy.O2Messages("openAscxAsForm", new object[] { typeof(ascx_CirAnalysis).FullName, ascxControlName });

            o2WcfProxy.O2Messages("executeOnAscxSync", new object[] { ascxControlName, "loadO2CirDataFile", new [] { DI.config.ExecutingAssembly } });
            //o2WcfProxy.O2Messages("getAscxSync", new object[] {ascxControlName});

            //var cirClasses = o2WcfProxy.O2Messages("executeOnAscxSync", new object[] { ascxControlName, "getClasses", new string[0]});
            var cirClasses = o2WcfProxy.getStringListFromAscxControl(ascxControlName, "getClasses", new string[0]);

            Assert.That(cirClasses != null, "prob with fetched cirClasses object");
            Assert.That(cirClasses.Count > 0, "There were no classes returned in cirClasses");
            DI.log.info("There were {0} classes returned", cirClasses.Count);

            var cirFunctions = o2WcfProxy.getStringListFromAscxControl(ascxControlName, "getFunctions", new string[0]);

            Assert.That(cirFunctions != null && cirFunctions.Count > 0, "prob with fetched cirFunctions object");
            DI.log.info("There were {0} functions returned", cirFunctions.Count);

            o2WcfProxy.O2Messages("closeAscxParent", new object[] { ascxControlName });

            WCF_DI.o2WcfKernelMessage.stopHost();
            //o2WcfProxy.closeO2KernelProcess();
        }
        public void test_openCirDataControlOnSeparateAppDomainViaWcf()
        {
            // First we need to figure out which DLL has the type we need
            var targetAssemblies = new List <string> {
                typeof(ascx_CirAnalysis).Assembly.Location, typeof(O2AscxGUI).Assembly.Location
            };
            //Assert.That(File.Exists(targetAssembly), "could not find assembly: " + targetAssembly);

            var dependentAssemblies = new CecilAssemblyDependencies(targetAssemblies, new List <string> {
                DI.config.hardCodedO2LocalBuildDir
            }).calculateDependencies();

            Assert.That(dependentAssemblies.Count > 0, "There we no dependencies calculated");
            DI.log.info("There are {0} dependent assemblies", dependentAssemblies.Count);
            // StringsAndLists.showListContents(dependentAssemblies);  // uncoment to see list of dlls
            var wcfHost = O2WcfUtils.createWcfHostForThisO2KernelProcess();
            IO2WcfKernelMessage o2WcfProxy = O2WcfUtils.getClientProxyForThisO2KernelProcess();

            runTestsViaWcfProxy(o2WcfProxy);
            // now that all tests are completed close host
            wcfHost.stopHost();
        }