Class TCommandApp
Unit
Declaration
type TCommandApp = class(TCustomApplication)
Description
This class allows you to define which arguments, commands, and options will be accepted as parameters by executing the application via the command line. For that it is necessary to use the TCommandApp.CommandBuilder property.
Ex:
uses Command.Interfaces, Command.App, Command.Usage, Command.Version; begin Application := TCommandApp.Create(nil); Application.Title := 'a basic cli tool sample project'; Command.Usage.Registry(Application.CommandBuilder); Command.Version.Registry(Application.CommandBuilder); Application.Run; Application.Free; end.
Hierarchy
- TCustomApplication
- TCommandApp
Overview
Methods
procedure DoRun; override; |
|
constructor Create(TheOwner: TComponent); override; |
Properties
property CommandBuilder: ICommandBuilder read FCommandBuilder write FCommandBuilder; |
Description
Methods
constructor Create(TheOwner: TComponent); override; |
|
Constructor of the class responsible for initializing it and its dependencies. The main dependency is the CommandBuilder. |
Properties
property CommandBuilder: ICommandBuilder read FCommandBuilder write FCommandBuilder; |
|
The CommandBuilder is the main property of the class, through which the commands, arguments and options that will be accepted as parameters via the command line can be configured. It is automatically launched when the application is created. |
Generated by PasDoc 0.16.0.