-
-
Notifications
You must be signed in to change notification settings - Fork 839
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
Support composite pattern via decorators/proxies #776
Comments
We'll have to think about this. Not sure if it'll make it in soon or not. The problem with opening internals up is that, basically, we're then stuck with them public as part of the supported API forever. Even if we stop using them and go a different route, we can't just refactor and remove anymore. I'll leave the issue open, but for now your best bet is to go the copy/paste route. |
I'm interested in improving our decorator support and catering for the composite pattern aligns with that. I would be interested to see what your implementation would look like if you could make the changes you are proposing. Perhaps this is something you could do in a fork that I could reference? |
@alexmg That's interesting -- I only considered superficial changes here to help reuse some code, but proper integration would look different. In my current solution:
In a perfect solution as I see it:
I'll take a look at what's needed to change for a perfect solution, but I can't promise any specific timeline. Hopefully later this week. |
Since the overall goal of the thing is to get composite support in, I've updated the title here. We're pushing to enhance decorator syntax and features, which will hopefully resolve this issue. I've created a larger meta-issue for tracking that at #880. In the meantime, I'll close this specific issue and hopefully we can handle everything at once. |
I've started building a RegisterComposite extension (same as #297), and I run into a few things that could be done better if I had more access to Autofac logic.
For example, it would be useful to be able to reuse logic behind
CollectionRegistrationSource
instead of doing this manually.My suggestion: either make
CollectionRegistrationSource
public and support a filter delegate or a virtual method; or exposeIsGenericListOrCollectionInterfaceType
and similar through a public helper.The text was updated successfully, but these errors were encountered: