Ejemplo n.º 1
0
        // internals
        //internal Command Clone();
        //internal Command(Command command);
        internal CommandProcessorBase CreateCommandProcessor(ExecutionContext executionContext, CommandManager commandFactory, bool addToHistory)
        {
            CommandProcessorBase cmdProcBase = commandFactory.CreateCommandProcessor(this);

            cmdProcBase.ExecutionContext = executionContext;

            if ((Parameters != null) && (Parameters.Count > 0))
            {
                foreach (CommandParameter parameter in Parameters)
                {
                    if (string.IsNullOrEmpty(parameter.Name))
                    {
                        cmdProcBase.AddParameter(parameter.Value);
                    }
                    else
                    {
                        cmdProcBase.AddParameter(parameter.Name, parameter.Value);
                    }
                }
            }

            return(cmdProcBase);
        }