Пример #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
Пример #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
Пример #3
0
			public DynamicPsUserInterface(DynamicPsHost host)
			{
				this.host = host;
			} // ctor
Пример #4
0
 public DynamicPsUserInterface(DynamicPsHost host)
 {
     this.host = host;
 }             // ctor