CommandPattern 1.0.0
This package contains a collection of classes and interfaces to allow for quick and consistent implementation of the command pattern across projects.
|
This Interface of the AsyncCommand abstract class, It is strongly recommended you use the AsyncCommand class rather than implement this yourself unless you are very familiar with asynchronous programming
More...
Public Member Functions | |
abstract Task | ExecuteAsync () |
This is where the logic of executing the command should be placed for an AsyncCommand, Execute should just store the return in CommandTask and setup the OnTaskCompleted method. Remember to make this method async as that isn't considered part of its signature. More... | |
![]() | |
abstract void | Execute () |
Executes the function of the command More... | |
Properties | |
Task | CommandTask [get] |
This should get the asynchronous task returned by ExecuteAsync after it reaches its first await More... | |
CancellationToken | CancellationToken [get, set] |
This can be used to Cancel the task after it has been started. More... | |
This Interface of the AsyncCommand abstract class, It is strongly recommended you use the AsyncCommand class rather than implement this yourself unless you are very familiar with asynchronous programming
|
pure virtual |
This is where the logic of executing the command should be placed for an AsyncCommand, Execute should just store the return in CommandTask and setup the OnTaskCompleted method. Remember to make this method async as that isn't considered part of its signature.
Implemented in SadSapphicGames.CommandPattern.AsyncCommand.
|
getset |
This can be used to Cancel the task after it has been started.
Implemented in SadSapphicGames.CommandPattern.AsyncCommand.
|
get |
This should get the asynchronous task returned by ExecuteAsync after it reaches its first await
Implemented in SadSapphicGames.CommandPattern.AsyncCommand.