You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently InjectionMethod only accepts "Name" of the method and tries to determine proper member based on parameters sent with the registration.
Problem
The selection process is rather involved operation and could add significant overhead to execution time.
Solution
In many cases performance could be improved if MethodInfo of the desired method is passed to the constructor. With that the developer would no longer be required to specify all parameters and only pass these that require specific resolution instructions.
For example, method InvokedMethod(string first, int second, int optional = 0) could be specified like this:
The text was updated successfully, but these errors were encountered:
ENikS
changed the title
Allow passing MethodInfo to InjectionMethod to simplify selection
Allow passing MemberInfo to Injection Members to simplify selection
Jun 4, 2020
ENikS
referenced
this issue
in unitycontainer/abstractions
Jun 4, 2020
Description
Currently
InjectionMethod
only accepts "Name" of the method and tries to determine proper member based on parameters sent with the registration.Problem
The selection process is rather involved operation and could add significant overhead to execution time.
Solution
In many cases performance could be improved if
MethodInfo
of the desired method is passed to the constructor. With that the developer would no longer be required to specify all parameters and only pass these that require specific resolution instructions.For example, method
InvokedMethod(string first, int second, int optional = 0)
could be specified like this:Impact
None.
The text was updated successfully, but these errors were encountered: