How to extend an assembly from other assemblies in C#

55 Views Asked by At

In my current assembly I have an Interface IProcessor that takes a type definition (using Mono.Cecil) and processes it "somehow".

The exact implementations of that interface are supposed to be in separate assemblies. So in order to find all implementations of IProcessor, I am looping over each assembly, searching sub classes and then call their process-method from the ProcessingManager.

But looping over every assembly is quite slow so I wondered if there might be some built-in feature to extend the functionality of ProcessingManager from outside of its assembly.

PS: My plan was to implement a similar behaviour as beans in spring boot where you can easily find all beans that implement a given interface. Only that in my case there are no beans but classes and they are in separate assemblies.

0

There are 0 best solutions below