REstate
REstate copied to clipboard
Add RetrieveOrCreateMachineAsync to IStateEngine`2
It is difficult to handle the case where a caller may need to either retrieve the machine or create it if it does not already exist. Currently it involves no less than 2 try catch blocks for an end consumer to ensure they successfully get a machine.
This should be mirrored in INaturalStateMachine as well.