Beispiel #1
0
        /// <summary></summary>
        /// <param name="sp"></param>
        public DynamicPowerShell(IServiceProvider sp)
        {
            this.sp = sp;

            this.host = new DynamicPsHost(this);

            // create the runspace
            this.runspace = RunspaceFactory.CreateRunspace(host, InitialSessionState.CreateDefault2());
            runspace.Open();

            // activate verbose
            runspace.SessionStateProxy.SetVariable("VerbosePreference", "Continue");
            //runspace.SessionStateProxy.SetVariable("DebugPreference", "Continue");
        }         // ctor
Beispiel #2
0
		public DynamicPowerShell(IServiceProvider sp)
		{
			this.sp = sp;

			this.host = new DynamicPsHost(this);

			// create the runspace
			this.runspace = RunspaceFactory.CreateRunspace(host, InitialSessionState.CreateDefault2());
			runspace.Open();

			// activate verbose
			runspace.SessionStateProxy.SetVariable("VerbosePreference", "Continue");
			//runspace.SessionStateProxy.SetVariable("DebugPreference", "Continue");
		} // ctor
Beispiel #3
0
			public DynamicPsUserInterface(DynamicPsHost host)
			{
				this.host = host;
			} // ctor
Beispiel #4
0
 public DynamicPsUserInterface(DynamicPsHost host)
 {
     this.host = host;
 }             // ctor