-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Florent Falcy edited this page Jan 11, 2016
·
1 revision
IChainCommand cmd = new YourCustomChainCommand();
//Add a callback to the end of command execution
cmd.OnExecuteDone(delegate ()
{
//do some stuff when cmd execution is done
});
//Execute command
cmd.Execute();
IChainCommand cmd1 = new YourCustomChainCommand();
IChainCommand cmd2 = new YourCustomChainCommand2();
cmd1.Chain(cmd2);
cmd1.OnExecuteDone(delegate ()
{
//do some stuff when cmd1 AND cmd 2 execution is done
});
cmd2.OnExecuteDone(delegate ()
{
//do some stuff when cmd 2 execution is done
});
//Execute "macro" command cmd1
cmd1.Execute();