Exemple #1
0
        /// <summary>
        /// Initiates the configuration object by loading all values from the app.config file.
        /// </summary>
        public Configuration()
        {
            _logTruncateAfterNumberOfFiles = ConfigUtil.GetOrCreateAppSetting(LOG_TRUNCATE_AFTER_NUMBER_OF_FILES_KEY, Constants.LOGS_TRUNCATE_AFTER_FILES);
            _lastUsedVersion       = string.IsNullOrEmpty(ConfigUtil.GetOrCreateAppSetting(LAST_USED_VERSION_KEY)) ? null : new Version(ConfigUtil.GetOrCreateAppSetting(LAST_USED_VERSION_KEY));
            _checkUpdatesOnStartup = ConfigUtil.GetOrCreateAppSetting(CHECK_UPDATES_ON_STARTUP_KEY, true);
            Browser systemBrowser = BrowserUtil.GetSystemDefaultBrowser();

            _loadAllProperties = ConfigUtil.GetOrCreateAppSetting(LOAD_ALL_PROPERTIES_KEY, false);
            _logLevel          = ConfigUtil.GetOrCreateAppSetting(LOG_LEVEL_KEY, LogLevel.Exception);
        }
Exemple #2
0
        /// <summary>
        /// Initiates the configuration object by loading all values from the app.config file.
        /// </summary>
        public Configuration()
        {
            _logTruncateAfterNumberOfFiles = ConfigUtil.GetOrCreateAppSetting(LOG_TRUNCATE_AFTER_NUMBER_OF_FILES_KEY, Constants.LOGS_TRUNCATE_AFTER_FILES);
            _lastUsedVersion       = string.IsNullOrEmpty(ConfigUtil.GetOrCreateAppSetting(LAST_USED_VERSION_KEY)) ? null : new Version(ConfigUtil.GetOrCreateAppSetting(LAST_USED_VERSION_KEY));
            _checkUpdatesOnStartup = ConfigUtil.GetOrCreateAppSetting(CHECK_UPDATES_ON_STARTUP_KEY, true);
            Browser systemBrowser = BrowserUtil.GetSystemDefaultBrowser();

            _loadAllProperties = ConfigUtil.GetOrCreateAppSetting(LOAD_ALL_PROPERTIES_KEY, true);
            _logLevel          = ConfigUtil.GetOrCreateAppSetting(LOG_LEVEL_KEY, LogLevel.Exception);
            _supportedResourceLanguageNames =
                from string languageName in
                ConfigUtil.GetOrCreateAppSetting(SUPPORTED_RESOURCELANGUAGENAMES_KEY, "en-us,de-de,fr-fr").Split(',')
                where !string.IsNullOrWhiteSpace(languageName)
                select languageName.Trim();
        }