Ejemplo n.º 1
0
        /// <summary>
        /// Retrieves the specified <see cref="ConfigurationSection"/> from the configuration file, and starts watching for
        /// its changes if not watching already.
        /// </summary>
        /// <param name="sectionName">The section name.</param>
        /// <returns>The section, or <see langword="null"/> if it doesn't exist.</returns>
        public ConfigurationSection GetSection(string sectionName)
        {
            ConfigurationSection configurationSection = DoGetSection(sectionName);

            SetConfigurationWatchers(sectionName, configurationSection);

            configurationSection = CompositeConfigurationHandler.CheckGetSection(sectionName, configurationSection);

            return(HierarchicalConfigurationHandler.CheckGetSection(sectionName, configurationSection));
        }