示例#1
0
        /// <summary>Handler for the help command. Displays the list of available commands.</summary>
        /// <param name="arguments"></param>
        protected virtual void Help(IList <string> arguments)
        {
            switch (arguments.Count)
            {
            case 1: Output.WriteLine(String.Join(" ", commandInterpreter.CommandNames.OrderBy(c => c).ToArray())); break;

            case 2: Output.Write(commandInterpreter.DescribeInvoke(arguments[1])); break;

            case 3: Output.Write(commandInterpreter.DescribeInvoke(arguments[1], arguments[2])); break;

            default: throw new Exception("Invalid arguments");
            }
        }