public IContainer CreateContainer() { const string appName = "dcs.unitTests"; var builder = new ContainerBuilder(); builder.RegisterLog4Net(appName); builder.RegisterServerRuntimeComponents(); builder.RegisterDb(); builder.RegisterEntityStorage(); builder.RegisterAssemblyTypes(typeof (AutofacContainerBootstrapper).Assembly); return builder.Build(); }
private static IContainer InitializeContainer() { var builder = new ContainerBuilder(); var assembly = typeof(DcsUserServicesApp).Assembly; const string appName = "dcs.userServices"; builder.RegisterLog4Net(appName); builder.RegisterServerRuntimeComponents(); builder.RegisterDb(); builder.RegisterEntityStorage(); var container = builder.Build(); var bus = container.ReGisterReBusBus(new AppSettings(), appName); container.RegisterRebusHandlersFromAssembly(bus, assembly); return container; }