Interface ICommand<TModel>
Base implementation for all code factory commands.
Namespace: CodeFactory
Assembly: CodeFactory.dll
Syntax
public interface ICommand<TModel> where TModel : class
Type Parameters
Name | Description |
---|---|
TModel | Target code factory model to be provided for the command. |
Methods
| Improve this Doc View SourceEnableCommandAsync(TModel)
Validation logic that will determine if this command should be enabled for execution.
Declaration
Task<bool> EnableCommandAsync(TModel result)
Parameters
Type | Name | Description |
---|---|---|
TModel | result | The target model data that will be used to determine if this command should be enabled. |
Returns
Type | Description |
---|---|
Task<bool> | Boolean flag that will tell code factory to enable this command or disable it. |
ExecuteCommandAsync(TModel)
Code factory framework calls this method when the command has been executed.
Declaration
Task ExecuteCommandAsync(TModel result)
Parameters
Type | Name | Description |
---|---|---|
TModel | result | The code factory model that has generated and provided to the command to process. |
Returns
Type | Description |
---|---|
Task |