Ejemplo n.º 1
0
 /// <summary>
 /// Adds a <see cref="ModuleInfo"/> to the <see cref="ModuleCatalog"/>.
 /// </summary>
 /// <param name="moduleInfo">The <see cref="ModuleInfo"/> to add.</param>
 /// <returns>The <see cref="ModuleCatalog"/> for easily adding multiple modules.</returns>
 public virtual void AddModule(ModuleInfo moduleInfo)
 {
     this.Items.Add(moduleInfo);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the <see cref="ModuleInfo"/> on which the received module dependens on.
 /// </summary>
 /// <param name="moduleInfo">Module whose dependant modules are requested.</param>
 /// <returns>Collection of <see cref="ModuleInfo"/> dependants of <paramref name="moduleInfo"/>.</returns>
 protected virtual IEnumerable <ModuleInfo> GetDependentModulesInner(ModuleInfo moduleInfo)
 {
     return(this.Modules.Where(dependantModule => moduleInfo.DependsOn.Contains(dependantModule.ModuleName)));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Return the list of <see cref="ModuleInfo"/>s that <paramref name="moduleInfo"/> depends on.
        /// </summary>
        /// <remarks>
        /// If  the <see cref="ModuleCatalog"/> was not yet validated, this method will call <see cref="Validate"/>.
        /// </remarks>
        /// <param name="moduleInfo">The <see cref="ModuleInfo"/> to get the </param>
        /// <returns>An enumeration of <see cref="ModuleInfo"/> that <paramref name="moduleInfo"/> depends on.</returns>
        public virtual IEnumerable <ModuleInfo> GetDependentModules(ModuleInfo moduleInfo)
        {
            this.EnsureCatalogValidated();

            return(this.GetDependentModulesInner(moduleInfo));
        }