Registry Mirror
Skip to content

Class proxies lose custom attributes on constructor parameters #341

Closed

Description

@gliljas

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.

Activity

  1. changed the title [-]Class proxies loses custom attributes on constructor parameters[/-] [+]Class proxies lose custom attributes on constructor parameters[/+] on Apr 6, 2018
  2. jonorossi commented on Apr 20, 2018

    @jonorossi
    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?

  3. gliljas commented on Apr 22, 2018

    @gliljas
    ContributorAuthor

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

  4. added this to the vNext milestone on May 14, 2018
  5. jonorossi commented on May 14, 2018

    @jonorossi
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions