-
Notifications
You must be signed in to change notification settings - Fork 769
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 GetPermittedTriggers to Accept StronglyTyped Triggers with Guards in the Configurations #457
base: dev
Are you sure you want to change the base?
Conversation
…ed Triggers. If it's not valid just don't return it.
i dont think that exception flow is good for normal behaviour. check my pull request - https://github.com/dotnet-state-machine/stateless/pull/451/files |
@anatoly-kryzhanovsky Thanks, I realize the performance issue about using exceptions. But I didn't want to change the logic in the internal implementation. I'm not quite sure about the internal implementation, are you sure that your changes will not affect the behavior of other places in the library? |
in old behavior in case of type mismatch exception will be throw and method will exit. in my code i added check for that case, no internal method was changed |
@tlk May you check this, please |
please! |
# Conflicts: # test/Stateless.Tests/TriggerWithParametersFixture.cs
Looks good. This does remove the laziness of the I guess it's just a question of whether we go with this option or #451 |
@WahidBitar - I haven't really looked at or thought about this project in years so I don't think I'm the right person to review, I don't think I ever really deserved membership of the org. |
There is no need to throw an exception when trying to get the Permitted Triggers. If it's not valid just don't return it.
The previous behavior was throwing exceptions when you have different types of strongly typed triggers and you try to check the available triggers for one of them.
I've added a Test Case to cover the issue. #450