Exemple #1
0
        public static XmlCommentsConfig GetConfiguration(System.Configuration.Configuration configuration)
        {
            XmlCommentsConfig config = null;

            if (configuration != null)
            {
                config = configuration.GetSection("xmlComments") as XmlCommentsConfig;
            }
            if (config == null)
            {
                config = ConfigurationManager.GetSection("xmlComments") as XmlCommentsConfig;
                if (config == null)
                {
                    string configFile = GetConfigFileFromCommandLine();
                    if (configFile != null && File.Exists(configFile))
                    {
                        System.Configuration.Configuration c = ConfigurationManager.OpenMappedExeConfiguration(new ExeConfigurationFileMap()
                        {
                            ExeConfigFilename = configFile
                        }, ConfigurationUserLevel.None);
                        if (c != null)
                        {
                            config = c.GetSection("xmlComments") as XmlCommentsConfig;
                        }
                    }
                }
                ;
            }
            return(config);
        }
Exemple #2
0
        private void ReadConfiguration(System.Configuration.Configuration configuration)
        {
            XmlCommentsConfig config = XmlCommentsConfig.GetConfiguration(configuration);

            if (config != null)
            {
                XmlCommentsImporter.options.Documentable  = config.Documentable;
                XmlCommentsImporter.options.Format        = config.Format;
                XmlCommentsImporter.options.WrapLongLines = config.WrapLongLines;
            }
        }