-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues Running StateMachine #41
Comments
Take a look at this test (https://github.com/appccelerate/statemachine/blob/master/source/Appccelerate.StateMachine.Specs/Async/Transitions.cs), it shows how the state machine can be used. And here (http://www.appccelerate.com/statemachinesample.html) you find some explanations. You can fire an event inside an There are two flavours of the state machine: passive and active. The passive state machine executes a transition whenever you call Let me know if this helps, otherwise I'll add a sample project to the solution. |
Thanks for the swift reply! I'll have some time later on today to have a look at this. I appreciate this is probably my naivety of the language, I'm seeing a lot of 'await' In the code sample that I have yet to learn fully. Thanks for your patience. |
Yes, async/await is very verbose and needs getting used to.
ConfigureAwait(false) is needed to tell the framework to not switch back to
the thread the call was originally from. Switching back normally only makes
sense in UI or Web-Controller Code (.net full framework). On .net core, the
framework never switches back, unless you have defined a
SynchronizationContext which does.
|
I'm having trouble getting the statemachine to transition.
Am I allowed to fire and event from inside an OnEntry function?
When I've called Start on the statemachine do I need to do a while loop to keep the state machine open?
Do you have a working code example for the tutorial on the site? It would be nice to see a full code structure just to see how you expect an IStateMachine to be interacted with.
The text was updated successfully, but these errors were encountered: