Esempio n. 1
0
        public static Runspace CreateRunspaceAndAttachToPowerShell(PowerShell ps, java.io.PrintStream outStream, java.io.PrintStream errStream)
        {
            JVMPSHostUserInterface ui = new JVMPSHostUserInterface(outStream, errStream);
            JVMPSHost psHost          = new JVMPSHost(ui);
            Runspace  jvm_Runspace    = RunspaceFactory.CreateRunspace(psHost);

            ps.Runspace = jvm_Runspace;
            jvm_Runspace.Open();
            return(jvm_Runspace);
        }
Esempio n. 2
0
 public JVMPSHost(JVMPSHostUserInterface ui)
 {
     this.ui = ui;
 }