-
Notifications
You must be signed in to change notification settings - Fork 10
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
resolving with custom parameter values #91
Comments
I tried changing my factory resolver to;
and calling it with;
but getting
|
Hey, the second one is the proper way to pass a parameter, however, it's not working now because of a bug. I'm going to fix it now and publish a new version. |
Could you please check the latest pre-release version? Thanks! |
Okay i'll let you know. meanwhile i used this workaround
|
okay works all good now but I guess I've found a better way to accomplish what i need;
|
Thanks for the feedback! |
so when it get's recreated will i have problems accessing the items or your recommendation is just sake of optimization? |
Just for optimization purposes, the factory remains stable. The container wipes out the whole cache only when you register something after you created the factory and if you do that frequently it could be regenerated over and over again, but if it's not the case, it'll remain cached, so it's fine with your version as well. |
Ah I do registrations only while initial initializing, still thanks for the heads up and great library! |
I've a named registration of;
_container.Register<IVariantSubproduct, StainlessSteelPlate>("PAS.LEV");
and definition of the class is
So i can named-resolve it like;
return _resolver.Resolve<IVariantSubproduct>(code);
but how can I supply the value of parameter?
return _resolver.Resolve<IVariantSubproduct>(code, params?);
The text was updated successfully, but these errors were encountered: