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
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.
The text was updated successfully, but these errors were encountered:
gliljas
changed the title
Class proxies loses custom attributes on constructor parameters
Class proxies lose custom attributes on constructor parameters
Apr 6, 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?
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.
The text was updated successfully, but these errors were encountered: