예제 #1
0
        /// <summary>
        /// Executes the command indicated by the 'command' verb.
        /// Looks up the command table, if command if found, invokes
        /// the command handler's execute function
        /// </summary>
        /// <param name="command">command verb</param>
        /// <param name="handled">was it handled?</param>
        /// <returns>Result of Execute()</returns>
        public virtual bool Dispatch(String command, ref bool handled)
        {
            IRunCommandHandler runCommand = Commands.Get(command);

            bool retVal = runCommand != null && runCommand.Execute(ref handled);

            return(retVal);
        }
예제 #2
0
        /// <summary>
        /// Dispatches the command by invoking the Execute
        /// function
        /// </summary>
        /// <param name="command">command to execute</param>
        /// <returns>return value of the Execute function</returns>
        public static bool Dispatch(IRunCommandHandler command)
        {
            bool retVal  = true;
            bool handled = false;

            if (command != null)
            {
                retVal = command.Execute(ref handled);
            }

            return(retVal);
        }
예제 #3
0
        /// <summary>
        /// Dispatches the command by invoking the Execute
        /// function
        /// </summary>
        /// <param name="command">command to execute</param>
        /// <returns>return value of the Execute function</returns>
        public static bool Dispatch(IRunCommandHandler command)
        {
            bool retVal = true;
            bool handled = false;

            if (command != null)
            {
                retVal = command.Execute(ref handled);
            }

            return retVal;
        }