/// <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); }
public void LoadCmdInfo() { _info = TestParameterCommand.CreateCmdletInfo(); _cmdlet = new TestParameterCommand(); _binder = new CmdletParameterBinder(_info, _cmdlet); }