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
{{ message }}
Class proxies lose custom attributes on constructor parameters #341
The proxy generation tries hard to keep and clone attributes, but not on the constructor parameters. This causes problems for us, since our IoC container uses attributes to resolve certain values. When combining this with AOP proxying for e.g logging, we can no longer inspect the custom attributes on the resolved type, but instead have to use reflection to find the base class constructor.
Also, is there something that would prohibit keeping the parameter names? Convention based value injection could be nice, and that will also be tricky right now.
@gliljas could you provide a code example or failing unit test of what you are doing/expecting. Are you attributes on the parameters set to inherit? Are you seeing constructor parameters with no names or just generic names?
Activity
[-]Class proxies loses custom attributes on constructor parameters[/-][+]Class proxies lose custom attributes on constructor parameters[/+]jonorossi commentedon Apr 20, 2018
@gliljas could you provide a code example or failing unit test of what you are doing/expecting. Are you attributes on the parameters set to inherit? Are you seeing constructor parameters with no names or just generic names?
gliljas commentedon Apr 22, 2018
See test in PR. I don't think inheritance comes into play.
jonorossi commentedon May 14, 2018
This should now be fixed by #355.