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

Multi factories support #30

Open
BANOnotIT opened this issue Apr 24, 2023 · 1 comment
Open

Multi factories support #30

BANOnotIT opened this issue Apr 24, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@BANOnotIT
Copy link
Contributor

You have bindMultivalue utill implemented and it's cool. But is there any way to implement multi factories that can traverse parent container also?

Use case is the following:
A system with plugin architecture requires plugins to be initialized and returned to plugin consumer as array. This can be partially done using following:

  • create a token to hold plugin factories
  • create a plugin multivalue token and bind resolving factory to it

Problems with this approach are following:

  • multivalue token will resolve in child containers and will not use parent container values
  • we have to implement resolution scopes by hand inside resolving factory which might lead to bugs and inconsistency

Is there some less fragile approach which doesn't involve the library API change or this feature can only be solved by adding things inside?

@mnasyrov
Copy link
Owner

Thanks for the idea, I'll need some time to think about it.

@mnasyrov mnasyrov added the enhancement New feature or request label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants