Exemplo n.º 1
0
        public static void Setup(IUnityContainer container)
        {
            SetupActivity(container);
            SetupAuditTrail(container);
            SetupEasyLOB(container);
            SetupExtensions(container);
            SetupIdentity(container);
            SetupLog(container);

            SetupApplication(container); // !!!

            // DIHelper
            container.RegisterType(typeof(IEnvironmentManager), typeof(EnvironmentManagerDesktop), AppLifetimeManager);
            //container.RegisterType(typeof(IEnvironmentManager), typeof(EnvironmentManagerWeb), AppLifetimeManager);

            IMapper mapper = AppHelper.SetupMappers();

            AppHelper.SetupProfiles();

            DIHelper.Setup(new DIManagerUnity(container), mapper);
        }
Exemplo n.º 2
0
        public static void Setup(ContainerBuilder containerBuilder)
        {
            SetupActivity(containerBuilder);
            SetupAuditTrail(containerBuilder);
            SetupEasyLOB(containerBuilder);
            SetupExtensions(containerBuilder);
            SetupIdentity(containerBuilder);
            SetupLog(containerBuilder);

            SetupApplication(containerBuilder); // !!!

            // DIHelper
            containerBuilder.RegisterType <EnvironmentManagerDesktop>().As <IEnvironmentManager>();
            //containerBuilder.RegisterType<EnvironmentManagerWeb>().As<IEnvironmentManager>();

            IContainer container = containerBuilder.Build();

            IMapper mapper = AppHelper.SetupMappers();

            AppHelper.SetupProfiles();

            DIHelper.Setup(new DIManagerAutofac(container), mapper);
        }