I have seen many question that ask how to load all referenced assemblies even if not directly used, but I would like to take that a step further. I am building a service and interface that can be extended, the intention is that I could extend the Sender/Receiver with additional types, for example: the interface is responsible for sending SMS messages and can have different adapters, say I have two different applications that want to use SMS, each would have its own implementation of an ISmsAdapter
and ISmsReplyAdapter
, the assemblies may not necessarily be referenced by the Service (the application comprises of a Windows Service and a WebAPI service to receive replies).
What I would like to be able to do is not just register my autofac modules that are in referenced assemblies, but also register modules in assemblies that are in say a specific folder such as /bin/plugins or something similar
I have not been able to find anything that relates to this other than Caliburn.Micro
which has a DirectoryCatalog
which does something similar to what I want
Does anyone know how I might be able to achieve this with Autofac please?