-
-
Notifications
You must be signed in to change notification settings - Fork 70
Legacy InjectionParameterValue #345
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
Comments
It was renamed to ParameterValue This is recommended way of using it: // Constructor
Container.RegisterType<Service>(
Invoke.Constructor(typeof(long),
Inject.Parameter(1)));
// Method
Container.RegisterType<Service>(
Invoke.Method(nameof(Service.MethodOne),
Inject.Parameter(1))); These are the available verbs you could use. Few examples how it could be used. I am working on new documentation for all the changes... |
@ENikS Thank you for the fast reply. I will take a look and try to adapt the code using this new classes. |
@ENikS I upgraded my code with your help and it worked like a charm. Thank you! |
@ershad65 take a look at the following gist and tell me whether it helps you: https://gist.github.com/xcap2000/2d264960cae55cf131edaa907a1a3eae |
Thanks @xcap2000. That helps |
@ershad65 you are welcome! |
Description
InjectionParameterValue do not exist anymore. I have some legacy code that uses this class in order to allow resolving contructor arguments generically by order based on the following article:
https://mikaelkoskinen.net/post/unity-passing-constructor-parameters-to-resolve
I would like an alternative way of doing that on current version (5.x).
To Reproduce
Try using InjectionParameterValue.
The text was updated successfully, but these errors were encountered: