Composing - Configure constructor parameters and properties
Hello,
I'm trying to register some services in a IUserComposer, which works for very simple stuff but I'm missing a couple of necessary functions that I'm used to working with Autofac.
I'm trying to configure the necessary constructor parameters and overwrite some properties of the created services.
Found out most of my necessary third-party packages have no impl. support for LightInject IOC and didn't feel like creating all of them myself so I just ended up using Umbraco 7 with Autofac instead.
It's a bit of a pity that Umbraco 8 uses a pretty much unknown library for its IOC if you'd ask me.
Composing - Configure constructor parameters and properties
Hello,
I'm trying to register some services in a IUserComposer, which works for very simple stuff but I'm missing a couple of necessary functions that I'm used to working with Autofac.
I'm trying to configure the necessary constructor parameters and overwrite some properties of the created services.
Autofac:
and
Can anybody help me out with this?
Rob
Hi Rob,
Interesting question. I've looked at the Umbraco source code and I came to this:
I'm not sure if this is what you're searching for? Give it a try and I'm curious if it will work..
I would suggest to search for 'Register' on the Umbraco 8 repository. You will get a lot of code samples how Umbraco is registering stuff. https://github.com/umbraco/Umbraco-CMS/search?q=Register&unscoped_q=Register
Hi Corné,
Thank you for your reply.
I took a look at the LightInject documentation, which was helpful.
Found out most of my necessary third-party packages have no impl. support for LightInject IOC and didn't feel like creating all of them myself so I just ended up using Umbraco 7 with Autofac instead.
It's a bit of a pity that Umbraco 8 uses a pretty much unknown library for its IOC if you'd ask me.
Regards,
Rob
is working on a reply...