Exemple #1
0
        public static List <IInstaller> InstallInstallers(DiContainer container)
        {
            var uninstalled = container.ResolveMany <IInstaller>();

            var allInstallers = new List <IInstaller>();

            while (!uninstalled.IsEmpty())
            {
                container.ReleaseBindings <IInstaller>();

                foreach (var installer in uninstalled)
                {
                    installer.InstallBindings();
                    allInstallers.Add(installer);
                }

                uninstalled = container.ResolveMany <IInstaller>();
            }

            return(allInstallers);
        }