示例#1
0
        static void RegistrarTodosOsModulos(Container container)
        {
            var assemblies = new AssembliesItix();

            var reflectionUtils = new ReflectionUtils();

            var containerRegister = reflectionUtils
                                    .AllImplementationsFrom <IContainerRegister>(assemblies.GetAssemblies())
                                    .Select(type => (Activator.CreateInstance(type) as IContainerRegister))
                                    .Select(register => { register.Assemblies = assemblies; return(register); })
                                    .ToList();


            containerRegister.ForEach(x => x.Register(container));


            containerRegister.ForEach(x => x.OnRegisterCompleted(container));
        }