Refresh() публичный статический Метод

Refreshes the currently loaded configuration settings to the latest values from the configuration file.
public static Refresh ( ) : void
Результат void
Пример #1
0
        /// <summary>
        /// Gets a collection of application elements from the configuration.
        /// </summary>
        /// <returns>A collection of application elements.</returns>
        private static IEnumerable <ApplicationElement> GetApplicationElements()
        {
            IEnumerable <ApplicationElement> applications;

            try
            {
                BlueCollarServiceSection.Refresh();
                applications = BlueCollarServiceSection.Section.Applications;
            }
            catch (ConfigurationErrorsException ex)
            {
                Logger.ErrorException("The configuration file is invalid. Please edit the configuration and re-save the file in order to load updated configuration information.", ex);
                applications = new ApplicationElement[0];
            }

            return(applications);
        }