public static bool Setup(Autofac.Module[] modules) { var setupOk = false; XmlConfigurator.Configure(); try { var builder = new ContainerBuilder(); modules.Foreach(m => builder.RegisterModule(m)); host = builder.Build(); setupOk = true; } catch (Exception ex) { log.Error(LogTitle.OBJECT_HOST_SETUP_ERROR, ex); } return setupOk; }