コード例 #1
0
        public static XmlCommentsConfig GetConfiguration(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))
                    {
                        Configuration c = ConfigurationManager.OpenMappedExeConfiguration(new ExeConfigurationFileMap()
                        {
                            ExeConfigFilename = configFile
                        }, ConfigurationUserLevel.None);
                        if (c != null)
                        {
                            config = c.GetSection("xmlComments") as XmlCommentsConfig;
                        }
                    }
                }
                ;
            }
            return(config);
        }
コード例 #2
0
        private void ReadConfiguration(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;
            }
        }