Example #1
0
        private static SubModule[] GetSubModules(GenerateInfo info)
        {
            NamedTypeList <SubModule> subModules = new NamedTypeList <SubModule>(info.SubModules);

            foreach (GenerateInfo subGen in info.Generates)
            {
                subModules.AddRange(GetSubModules(subGen));
            }
            return(subModules.ToArray());
        }
Example #2
0
        /// <summary>
        ///   Generates the generate section sub-information.
        /// </summary>
        /// <param name="info"><see cref="GenerateInfo"/> object to generate the sub-information on.</param>
        /// <returns>Lookup table of the sub-information.</returns>
        private Dictionary <string, List <string> > GenerateGeneratesSubInfo(GenerateInfo info)
        {
            Dictionary <string, List <string> > lookup = new Dictionary <string, List <string> >();

            // Add Processes.
            if (info.Processes.Count > 0)
            {
                lookup.Add("Processes:", GenerateNamesFromBaseTypeInfo(info.Processes.ToArray()));
            }

            // Add Generates.
            if (info.Generates.Count > 0)
            {
                lookup.Add("Generates:", GenerateNamesFromBaseTypeInfo(info.Generates.ToArray()));
            }

            // Add Sub-Modules.
            if (info.SubModules.Count > 0)
            {
                lookup.Add("Sub-Modules:", GenerateNamesFromBaseTypeInfo(info.SubModules.ToArray()));
            }

            return(lookup);
        }