-
Notifications
You must be signed in to change notification settings - Fork 168
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
Lifecycle sopes with factory provider #140
Labels
Comments
+1 |
I would like to see this as well - it would make dynamic external configuration much easier.
I think this could be implemented with a custom factory type and a weak map |
Ok I hacked this together.
|
Thanks @daniel-white However, for my use-case I need to be able to clear the singletons with
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Currently you cant use lifecycle scopes with
useFactory
provider.Transient
is supported by default andSingleton
can be achieved with theinstacneCachingFactory
wrapper, but there is no way to doContainerScoped
orResolutionScoped
.Is there a way to get
ContainerScoped
working with factories? Should we maybe supportLifecycle.Singleton
instead of theinstanceCachingFactory
and add support for scopes isntead?Factory called
Transient
(default)Singleton
ContainerScoped
ResolutionScoped
This would result in a more powerful and consistent registration api in my opinion.
The
predicateAwareClassFactory
could also be scrapped basically, since the same result can be achieved without it;Any thoughts on this.
The text was updated successfully, but these errors were encountered: