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

Add method to easily register "reply" events #28

Open
tupini07 opened this issue Nov 13, 2020 · 0 comments
Open

Add method to easily register "reply" events #28

tupini07 opened this issue Nov 13, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tupini07
Copy link
Contributor

Currently, we need to use the RegisterLocal method to register a reply event, as well as the EventManagerConstants.ReplyPrefix to fill the name of the event. Since this constant is internal and we want to avoid unnecessary duplication we should implement a wrapper method that accepts the name of the event and automatically registers it as a reply callback. An idea for this implementation:

RegisterLocalReply(eventName, callback) {
  RegisterLocal(
    EventManagerConstants.ReplyPrefix + eventName,
    callback
  );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant