public ModuleExecutionContext Execute(params Type[] modules)
        {
            if (modules == null || !modules.Any())
            {
                if (this._modules == null)
                {
                    this._modules = TypeHelper.GetTypesImplementingInterface <IInitializableModule>();
                }
            }
            else
            {
                _modules = modules;
            }

            var modulesWithDep = this._modules.Select(
                m =>
                new ModuleDescriptor(CreateModule(m),
                                     m,
                                     TypeHelper.GetAttributes <ModuleDependencyAttribute>(m)
                                     .Select(d => d.DependencyModule)));

            var engine   = new ModuleExecutionEngine();
            var weighter = new ModuleWeighter();

            return(engine.RunModules(weighter.SortModules(modulesWithDep.ToList()), new ModuleExecutionContext()));
        }
        public ModuleExecutionContext Execute()
        {
            if (this._modules == null)
            {
                this._modules = TypeHelper.GetTypesImplementingInterface<IInitializableModule>();
            }

            var modulesWithDep = this._modules.Select(
                                                      m =>
                                                      new ModuleDescriptor(CreateModule(m),
                                                                           m,
                                                                           TypeHelper.GetAttributes<ModuleDependencyAttribute>(m)
                                                                                     .Select(d => d.DependencyModule)));

            var engine = new ModuleExecutionEngine();
            var weighter = new ModuleWeighter();

            return engine.RunModules(weighter.SortModules(modulesWithDep.ToList()), new ModuleExecutionContext());
        }