예제 #1
0
        internal ParameterBinderController NewParameterBinderController(InternalCommand command)
        {
            ParameterBinderBase base2;
            Cmdlet cmdlet = command as Cmdlet;

            if (cmdlet == null)
            {
                throw PSTraceSource.NewArgumentException("command");
            }
            IScriptCommandInfo commandInfo = base.CommandInfo as IScriptCommandInfo;

            if (commandInfo != null)
            {
                base2 = new ScriptParameterBinder(commandInfo.ScriptBlock, cmdlet.MyInvocation, base._context, cmdlet, base.CommandScope);
            }
            else
            {
                base2 = new ReflectionParameterBinder(cmdlet, cmdlet);
            }
            this._cmdletParameterBinderController = new System.Management.Automation.CmdletParameterBinderController(cmdlet, base.CommandInfo.CommandMetadata, base2);
            return(this._cmdletParameterBinderController);
        }
예제 #2
0
 internal ParameterBinderController NewParameterBinderController(InternalCommand command)
 {
     ParameterBinderBase base2;
     Cmdlet cmdlet = command as Cmdlet;
     if (cmdlet == null)
     {
         throw PSTraceSource.NewArgumentException("command");
     }
     IScriptCommandInfo commandInfo = base.CommandInfo as IScriptCommandInfo;
     if (commandInfo != null)
     {
         base2 = new ScriptParameterBinder(commandInfo.ScriptBlock, cmdlet.MyInvocation, base._context, cmdlet, base.CommandScope);
     }
     else
     {
         base2 = new ReflectionParameterBinder(cmdlet, cmdlet);
     }
     this._cmdletParameterBinderController = new System.Management.Automation.CmdletParameterBinderController(cmdlet, base.CommandInfo.CommandMetadata, base2);
     return this._cmdletParameterBinderController;
 }