/// <summary>
        /// Executes the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="args">The arguments.</param>
        public override void Execute(CommandSet context, string[] args)
        {
            if (args.Length < 2)
            {
                if (!string.IsNullOrEmpty(context.Description))
                {
                    Console.WriteLine(context.Description);
                }

                Console.WriteLine();
                Console.WriteLine("Commands:");
                context.WriteCommandDescriptions(Console.Out);
                Console.WriteLine("\nSee 'help <command>' for more information on a specific command");

                return;
            }

            if (context.ContainsKey(args[1].ToLower()))
            {
                context[args[1].ToLower()].WriteOptionSet(Console.Out);
            }
        }
예제 #2
0
 /// <summary>
 /// Executes the specified context.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="args">The arguments.</param>
 public override void Execute(CommandSet context, string[] args)
 {
     context.TimeToQuit = true;
 }
예제 #3
0
 /// <summary>
 /// Executes the specified context.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="args">The arguments.</param>
 public virtual void Execute(CommandSet context, string[] args)
 {
     Execute(args);
 }