Esempio n. 1
0
 /// <summary>
 /// First phase of cmdlet lifecycle: "Binding Parameters that Take Command-Line Input"
 /// </summary>
 public override void Prepare()
 {
     Cmdlet cmdlet = (Cmdlet)Activator.CreateInstance(_cmdletInfo.ImplementingType);
     cmdlet.CommandInfo = _cmdletInfo;
     cmdlet.ExecutionContext = base.ExecutionContext;
     cmdlet.CommandRuntime = CommandRuntime;
     Command = cmdlet;
     MergeParameters();
     _argumentBinder = new CmdletParameterBinder(_cmdletInfo, Command);
     _argumentBinder.BindCommandLineParameters(Parameters);
 }
Esempio n. 2
0
        /// <summary>
        /// First phase of cmdlet lifecycle: "Binding Parameters that Take Command-Line Input"
        /// </summary>
        public override void Prepare()
        {
            Cmdlet cmdlet = (Cmdlet)Activator.CreateInstance(_cmdletInfo.ImplementingType);

            cmdlet.CommandInfo      = _cmdletInfo;
            cmdlet.ExecutionContext = base.ExecutionContext;
            cmdlet.CommandRuntime   = CommandRuntime;
            Command = cmdlet;
            MergeParameters();
            _argumentBinder = new CmdletParameterBinder(_cmdletInfo, Command);
            _argumentBinder.BindCommandLineParameters(Parameters);
        }
Esempio n. 3
0
 public void LoadCmdInfo()
 {
     _info = TestParameterCommand.CreateCmdletInfo();
     _cmdlet = new TestParameterCommand();
     _binder = new CmdletParameterBinder(_info, _cmdlet);
 }