2

Currently stuck on a problem with autofac registrations. To summarise I have an autofac module that registers many instances of IHandle. There could be many implementations of IHandle and IHandle and each typeof(A) or typeof(B) has a corrosponding configuration class that is passed into another Module with the same builder. My question is DURING the build process how can I get the current registrations that implement > and match them to the correct message configuration, remembering that there could be many implementations of IHandle.

I want to use builder.Register(ctx => {}) but how can I loop within this Register call and register multiple processors for each handler in the component registry

I can get the types of IHandle within the registery by dont know how to register the new processor matching the configuration

Hope that makes sense....

Thanks in advance

Richard

  • 1
    Why don't you show some code first – Alexey Zimarev Jun 17 '16 at 11:04
  • 1
    Definitely need more to go on. Possible duplicate of https://stackoverflow.com/questions/18988210/conditional-component-registration-in-autofac but also may have an answer _very_ closely related to this https://stackoverflow.com/questions/37835441/get-all-asclosedtypesof-registration-variants-from-the-autofac-builder – Travis Illig Jun 18 '16 at 09:33

0 Answers0