Exemplo n.º 1
0
        public static void ProcessAllExistingIncludes(ConfigSectionNode node, string includePragma, string level)
        {
            const int CONST_MAX_INCLUDE_DEPTH = 7;

            try
            {
                for (int count = 0; node.ProcessIncludePragmas(true, includePragma); count++)
                {
                    if (count >= CONST_MAX_INCLUDE_DEPTH)
                    {
                        throw new ConfigException(Sky.StringConsts.CONFIGURATION_INCLUDE_PRAGMA_DEPTH_ERROR.Args(CONST_MAX_INCLUDE_DEPTH));
                    }
                }
            }
            catch (Exception error)
            {
                throw new ConfigException(StringConsts.CONFIGURATION_INCLUDE_PRAGMA_ERROR.Args(level, error.ToMessageWithType()), error);
            }
        }