Closed iamprovidence closed 5 years ago
And about our special exception, what is it?
I thouhgt something like NotExecutedCommandException. But second option seems better for me. We can add some enum to CommandBase, like CommandState { ok, wrong } and so on. and if command after executing has bad state, other command should not be executed
I think, CommandState can be like this CommandState { Default,// state has not been changed Executed, // command has been successfully executed Interrupted // command has been interrupted }
This command should have an opportunity to execute many commands(queue behaviour). And also it should check if next command in line can be executed. for example if we have two command in line (checkValue, Save) and checkValue return false other commands should be interrupted. I think we can do this with our special exception or we could add Property to CommandBase. How to implement this should be discussed before developing