Hi Richard, Thanks for that - most helpful. Sorry I hadn't replied sooner.
Cheers David On Wed, 11 Dec 2019 at 17:35, Richard Carde <[email protected]> wrote: > On Fri, 29 Nov 2019 at 11:22, David Burstin <[email protected]> > wrote: > >> Hi guys, >> >> Got a DI question: >> > ... > >> Is there a way that I can get MVC DI to resolve IHoldAllInterfaces so >> that at runtime it will pass in an object that holds all of the internal >> interfaces already resolved per the startup.cs file? >> > > Sounds like you're after an aggregate service. I was introduced to AutoFac's > ability > <https://autofaccn.readthedocs.io/en/latest/advanced/aggregate-services.html> > to do that a few months ago when doing a code review. > > A quick Google suggests Microsoft's built-in DI container won't do it but this > Stack Overflow thread > <https://stackoverflow.com/questions/46981260/what-is-the-equivalent-of-autofacs-aggregate-services-in-microsofts-dependency> > might be of use. > > >> I hope this makes sense - I'm not very good at writing questions clearly >> *and* concisely :) >> >> Cheers >> David >> > > > -- > Regards, > > RC > > >
