Skip to content
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

Class proxies lose custom attributes on constructor parameters #341

Closed
gliljas opened this issue Apr 5, 2018 · 3 comments
Closed

Class proxies lose custom attributes on constructor parameters #341

gliljas opened this issue Apr 5, 2018 · 3 comments
Milestone

Comments

@gliljas
Copy link
Contributor

gliljas commented Apr 5, 2018

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 gliljas changed the title Class proxies loses custom attributes on constructor parameters Class proxies lose custom attributes on constructor parameters Apr 6, 2018
@jonorossi
Copy link
Member

@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
Copy link
Contributor Author

gliljas commented Apr 22, 2018

See test in PR. I don't think inheritance comes into play.

@jonorossi jonorossi added this to the vNext milestone May 14, 2018
@jonorossi
Copy link
Member

This should now be fixed by #355.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants