Class CommandBase<TArgs>
Implements
Inherited Members
Namespace: PayrollEngine.Client.Command
Assembly: PayrollEngine.Client.Core.dll
Syntax
public abstract class CommandBase<TArgs> : CommandBase, ICommand where TArgs : ICommandParameters, new()
Type Parameters
| Name | Description |
|---|---|
| TArgs |
Constructors
CommandBase()
Declaration
protected CommandBase()
Methods
Execute(CommandContext, TArgs)
Execute command.
Declaration
protected abstract Task<int> Execute(CommandContext context, TArgs parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandContext | context | Command context. |
| TArgs | parameters | Command parameters. |
Returns
| Type | Description |
|---|---|
| Task<int> | Error code, zero on valid command execution. |
OnExecute(CommandContext, ICommandParameters)
Execute command.
Declaration
protected override Task<int> OnExecute(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. |