I have a similar setup shown in this question and was wondering if I could replace all my code that uses reflection to find plugins of a certain type and then does a CreateInstance on it with a IOC Container that does something like:
builder.RegisterAssemblyTypes(typeof(MyType).Assembly)
Yes, you could do something like this:
builder.RegisterAssemblyTypes(typeof(MyType).Assembly).AsImplementedInterfaces();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With