Interface ICommand
Command interface.
Namespace: PayrollEngine.Client.Command
Assembly: PayrollEngine.Client.Core.dll
Syntax
public interface ICommand
Properties
BackendCommand
Backend command.
Declaration
bool BackendCommand { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Command name.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
ExecuteAsync(CommandContext, ICommandParameters)
Execute command.
Declaration
Task<int> ExecuteAsync(CommandContext context, ICommandParameters parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandContext | context | Command context. |
| ICommandParameters | parameters | Command parameters. |
Returns
| Type | Description |
|---|---|
| Task<int> | Error code, zero on valid command execution. |
GetParameters(CommandLineParser)
Get command parameters.
Declaration
ICommandParameters GetParameters(CommandLineParser parser)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandLineParser | parser | Command line parser. |
Returns
| Type | Description |
|---|---|
| ICommandParameters |
ShowHelp(ICommandConsole)
Show command help.
Declaration
void ShowHelp(ICommandConsole console)
Parameters
| Type | Name | Description |
|---|---|---|
| ICommandConsole | console | Display console. |