/// <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); } }
/// <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; }
/// <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); }