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

Executors: add Ringa.inject() wrapper #24

Open
joshjung opened this issue Jan 27, 2017 · 0 comments
Open

Executors: add Ringa.inject() wrapper #24

joshjung opened this issue Jan 27, 2017 · 0 comments

Comments

@joshjung
Copy link
Collaborator

Target Code:

import {inject} from 'ringa';

controller.addListener('test', [
  Executor1,
  inject(Executor2, {
    property1: 'some value'
  }),
  Executor2
]);

When Executor2's is executed the following occurs:

CommandAbstract and CommandFunctionWrapper: the injection Object is merged into the standard injections for the execute() method.

CommandEventWrapper: the injection Object becomes the details for the event.

Note: we may want to consider allowing Executor2 to be its own chain, but I think that will make complexity go through the roof right now.

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

No branches or pull requests

1 participant