Skip to content
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

Allow permitDynamic destination state to be calculated with an async function (Task) #595

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Jon2G
Copy link

@Jon2G Jon2G commented Jul 16, 2024

No description provided.

@mclift
Copy link
Member

mclift commented Jul 22, 2024

Thanks for taking the time to contribute, @Jon2G

As there's no issue associated with this PR, I'm curious to know if this addresses a particular problem you've encountered or if it's intended purely to bring parity between the synchronous and the async configuration methods.

Some feedback on the unit tests (thank you for writing them!):

  • Some of the new methods don't appear to have test coverage; it would be good to make sure they all have tests.
  • Many of the tests include a short delay that doesn't seem necessary; could they return immediately? Something like .PermitDynamicAsync(Trigger.X, async () => await Task.FromResult(State.B)) perhaps?

* Add missing test functions
* DynamicAsync was not been detected by reflection state info
@Jon2G
Copy link
Author

Jon2G commented Aug 5, 2024

Hi, first of all thank you for making this awesome project!!, state machines should be a standard in programming!
There is no issue, i just needed a way to determine what should be the next state dynamically with a a task/async function.
I made the changes you requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants