This project has moved. For the latest updates, please go here.

MGR.CommandLineParser.Command.CommandBase Reference

CommandBase provides an abstract implementation of urlICommand:http://mgrcommandlineparser.codeplex.com/wikipage?title=MGR.CommandLineParser.Command.ICommand%20Reference. It adds an Help option, and the logic to display the help of the command if requested.

Methods

  • public virtual int Execute() : provides the logic to display the help if needed, or to execute the command's logic. You can override the method if you want bypass or replace the logic to display the help.
  • protected abstract int ExecuteCommand() : Executes the logic of the command. This is the new entry point for the logic of the command.

Properties

  • protected IConsole Console {get; } : Gets the current implementation of IConsole used by the parser.
  • public IList<string> Arguments { get; } : Gets the list of arguments for the command.
  • public bool Help { get; set; } : Gets or sets the option to determine if the help of the command should be display.

Last edited Apr 20, 2012 at 11:19 AM by mgrosperrin, version 2