1

Using the instructions from http://www.milosev.com/98-c/wpf/373-autofac-and-prism-together#dependencyInjection I tried to setup my module's dependencies (eg. ViewModel requires some IServices to be constructed). The only thing I haven't used is that MEF thing but as far as I understood it is something alternative to Unity or Autofac.

I couldn't find any proper place to put the registration of types that are specific to my Module. Temporarily I use static method from my module class that is called from Bootstrapper's ConfigureContainerBuilder()

protected override void ConfigureContainerBuilder(ContainerBuilder containerBuilder)
{
    base.ConfigureContainerBuilder(containerBuilder);
    RoomSimulatorModule.InitializeDependencies(containerBuilder);
}

But it is called before my Module is initialised. Is there any way to add those types during module registration? Or due to the way Autofac constructs the container I can't register new types?

Janusz-kun
  • 89
  • 2
  • 11
  • 1
    check this out: http://docs.autofac.org/en/latest/integration/mvc.html#using-plugin-assemblies – Kostya Oct 29 '17 at 22:19

0 Answers0