コード例 #1
0
        public void loadCSharpScriptsGuiOnSeparateAppDomainUsingWCF_UsingO2WcfObject()
        {
            var wcfHostName = "loadCSharpScriptsGui";
            var wcfServer = new O2WcfServer(wcfHostName);
            var wcfClient = new O2WcfClient(wcfHostName);
            Assert.That(wcfServer.AllOK, "wcfServer was not OK");
            Assert.That(wcfClient.AllOK, "wcfClient was not OK");

            WCFCecilAssemblyDependencies.createAppDomainViaWcfClient(wcfClient,typeof(StartCSharpScriptGui));
            DI.log.info("**UnitTest: using main (with all controls currently loaded via it ");
            //if (false)
            {
                wcfClient.invoke(typeof (StartCSharpScriptGui), "Main", new object[0]);
                Processes.Sleep(2000);
                wcfClient.o2GuiAscx.close();
                wcfClient.o2GuiAscx.waitForAscxGuiClose();
            }
            DI.log.info("**UnitTest: just the gui with one ascx_Scripts module");
            //if (false)
            {
                wcfClient.o2GuiAscx.launch();
                wcfClient.o2GuiAscx.openAscx(typeof (ascx_Scripts), O2DockState.Document, "ascx_Scripts");
                wcfClient.o2GuiAscx.close();
                wcfClient.o2GuiAscx.waitForAscxGuiClose();
            }

            DI.log.info("**UnitTest: just the ascx_Scripts as a stand alone form");
            //if (false)
            {
                wcfClient.o2GuiAscx.openAscxAsForm(typeof (ascx_Scripts), "ascx_Scripts");
                Processes.Sleep(2000);
                wcfClient.o2GuiAscx.closeAscxParent("ascx_Scripts");
                wcfClient.o2GuiAscx.waitForAscxGuiClose();
            }
            //O2AscxGUI.closeAscxParent("ascx_Scripts");

            wcfClient.close();
            wcfServer.close();  
            
        }
コード例 #2
0
        public void launchGuiViaMain()
        {
            var wcfHostName = "loadCSharpScriptsGui";
            wcfServer = new O2WcfServer(wcfHostName);
            wcfClient = new O2WcfClient(wcfHostName);
            Assert.That(wcfServer.AllOK, "wcfServer was not OK");
            Assert.That(wcfClient.AllOK, "wcfClient was not OK");
            WCFCecilAssemblyDependencies.createAppDomainViaWcfClient(wcfClient, typeof(StartCSharpScriptGui));
            wcfClient.invoke(typeof(StartCSharpScriptGui), "Main", new object[0]);

            // check if the three original controls are loaded
            Processes.Sleep(5000);
            ascx_ScriptsFolderControl = checkIfControlIsLoaded(typeof(StartCSharpScriptGui), "ascx_ScriptsFolderName");
            ascx_AssemblyInvokeControl = checkIfControlIsLoaded(typeof(StartCSharpScriptGui), "ascx_AssemblyInvokeName");
            ascx_O2MdbgShellControl = checkIfControlIsLoaded(typeof(StartCSharpScriptGui), "ascx_O2MdbgShellName");

            //Assert.That(wcfClient.o2GuiAscx.isAscxLoaded(scriptsFolderControl), "'Scripts Folder' ascx was not loaded");

            DI.log.LogRedirectionTarget = null;  // make this null so that we get all DI.log messages (since the O2AscxGui sets this to capture the logs for its LogViewer
            //wcfClient.o2GuiAscx.
              //O2AscxGUI.isAscxLoaded() 
        }
        public static void createAppDomainViaWcfClient(O2WcfClient wcfClient, List<Type> typesToLoadWithAllDependencies)
        {
            List<String> dependentAssemblies = CecilAssemblyDependencies.getListOfDependenciesForTypes(typesToLoadWithAllDependencies);

            wcfClient.createRemoteAppDomainWithAssemblies(wcfClient.RemoteAppDomainName, new List<string>(dependentAssemblies));
        }
 public static void createAppDomainViaWcfClient(O2WcfClient wcfClient, Type typeToLoadWithAllDependencies)
 {
     createAppDomainViaWcfClient(wcfClient, new List<Type> { typeToLoadWithAllDependencies });
 }
コード例 #5
0
ファイル: O2WcfClient.cs プロジェクト: pusp/o2platform
 public O2GuiAscxWrapper(O2WcfClient _o2WcfClient)
 {
     o2WcfClient = _o2WcfClient;
 }
コード例 #6
0
 public O2GuiAscxWrapper(O2WcfClient _o2WcfClient)
 {
     o2WcfClient = _o2WcfClient;
 }