-
Notifications
You must be signed in to change notification settings - Fork 129
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
Question: treat two events the same way #30
Comments
No, this is not possible in such an easy way. If you don't want to duplicate the code, I suggest putting the part from However, I struggle to find a scenario in which I would react the same to two different events. Can you merge these two events into a single event? Maybe you have to split externally visible events from internally used events? I do not want to add this syntax unless we have a good scenario for it. I hope you understand, sorry. |
I'm implementing a communication protocol, and in one state of the client, two control bytes should generate the same reaction when received. |
I see no easy way to accomplish that with the way the fluent syntax is currently built, sorry. |
It could be done easily by an extension at Firing time with And at queue time with a few changes : In the Passive Implementation, by swapping the following lines in
|
That would work, but the understandability of the code would suffer a lot because the knowledge that C is handled as B is hidden and not visible in the definition. |
Is it possible to react to two different events in the same way?
Example:
I want to not copy the whole if-otherwise-lines for the second event
The text was updated successfully, but these errors were encountered: