Example #1
0
        public Session()
        {
            _executionQueue = new ExecutionQueue();

            _host     = new Host();
            _runspace = RunspaceFactory.CreateRunspace(_host);
            _runspace.ApartmentState = ApartmentState.STA;
            _runspace.ThreadOptions  = PSThreadOptions.UseNewThread;
            _runspace.Open();

            _powerShell          = PowerShell.Create();
            _powerShell.Runspace = _runspace;

            _cancelEvent = new ManualResetEvent(false);

            Configuration = new Configuration();
        }
Example #2
0
 public Roundtrip(ExecutionQueue q)
 {
     _viewModel = new RoundtripViewModel(this);
     _executionQueue = q;
 }