Exemplo n.º 1
0
        /// <summary>
        /// Save Features.SavedQuery settings to the settings file
        /// </summary>
        /// <param name="sqNode">XML-node for the Features.SavedQuery settings</param>

        public void Save(XmlNode sqNode)
        {
            string xpath;

            xpath = "./storageType";
            SettingsHelper.SetSettingValue(xpath, sqNode, StorageType.ToString());

            xpath = "./enableCache";
            SettingsHelper.SetSettingValue(xpath, sqNode, EnableCache.ToString());

            xpath = "./cacheTime";
            SettingsHelper.SetSettingValue(xpath, sqNode, CacheTime.ToString());

            xpath = "./enableCORS";
            SettingsHelper.SetSettingValue(xpath, sqNode, EnableCORS.ToString());

            xpath = "./showPeriodAndId";
            SettingsHelper.SetSettingValue(xpath, sqNode, ShowPeriodAndId.ToString());

            xpath = "./enableLimiterRequest";
            SettingsHelper.SetSettingValue(xpath, sqNode, EnableLimitRequest.ToString());

            xpath = "./limiterRequests";
            SettingsHelper.SetSettingValue(xpath, sqNode, LimiterRequests.ToString());

            xpath = "./limiterTimespan";
            SettingsHelper.SetSettingValue(xpath, sqNode, LimiterTimespan.ToString());
        }
Exemplo n.º 2
0
        /// <summary>
        /// Save Features.Api settings to the settings file
        /// </summary>
        /// <param name="apiNode">XML-node for the Features.Api settings</param>
        public void Save(XmlNode apiNode)
        {
            string xpath;

            xpath = "./urlRoot";
            SettingsHelper.SetSettingValue(xpath, apiNode, UrlRoot);

            xpath = "./routePrefix";
            SettingsHelper.SetSettingValue(xpath, apiNode, RoutePrefix);

            xpath = "./maxValuesReturned";
            SettingsHelper.SetSettingValue(xpath, apiNode, MaxValuesReturned.ToString());

            xpath = "./limiterRequests";
            SettingsHelper.SetSettingValue(xpath, apiNode, LimiterRequests.ToString());

            xpath = "./limiterTimespan";
            SettingsHelper.SetSettingValue(xpath, apiNode, LimiterTimespan.ToString());

            xpath = "./fetchCellLimit";
            SettingsHelper.SetSettingValue(xpath, apiNode, FetchCellLimit.ToString());

            xpath = "./enableCORS";
            SettingsHelper.SetSettingValue(xpath, apiNode, EnableCORS.ToString());

            xpath = "./enableCache";
            SettingsHelper.SetSettingValue(xpath, apiNode, EnableCache.ToString());

            xpath = "./showQueryInformation";
            SettingsHelper.SetSettingValue(xpath, apiNode, ShowQueryInformation.ToString());

            xpath = "./infoURL";
            SettingsHelper.SetSettingValue(xpath, apiNode, InfoURL);

            xpath = "./defaultExampleResponseFormat";
            SettingsHelper.SetSettingValue(xpath, apiNode, DefaultExampleResponseFormat);

            xpath = "./showSaveApiQueryButton";
            SettingsHelper.SetSettingValue(xpath, apiNode, ShowSaveApiQueryButton.ToString());

            xpath = "./saveApiQueryText";
            SettingsHelper.SetSettingValue(xpath, apiNode, SaveApiQueryText);
        }