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

Allows to disable auto registration #181

Closed
wants to merge 1 commit into from

Conversation

doozMen
Copy link
Contributor

@doozMen doozMen commented Feb 2, 2024

When multiple registrations from different
modules are needed it is more optimal
to handle the registrations yourself instead
of relying on autoregistrations.

But in the case of only one module loaded then
autoRegistration is preferable.

Allowing this on the public interface would
allow this behaviour to be configurable

When multiple registrations from different
modules are needed it is more optimal
to handle the registrations yourself instead
of relying on autoregistrations.

But in the case of only one module loaded then
autoRegistration is preferable.

Allowing this on the public interface would
allow this behaviour to be configurable
@hmlongco
Copy link
Owner

hmlongco commented Feb 2, 2024

Guess I'm missing something here. If you don't want auto registration behavior then don't make the container conform to AutoRegistering.

@doozMen
Copy link
Contributor Author

doozMen commented Feb 5, 2024

I have several libraries that all have autoregistration when used individually. I have 1 library that includes them all. This is a library used in testing applications that have the requirement to be able to switch at runtime, the production app does not. So the auto registration in the 1 library that includes them all is redundant, as I need to register all anyway. Sorry should have added context.

@doozMen doozMen closed this Mar 6, 2024
@doozMen doozMen deleted the allow-disable-auto-register branch March 6, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants