/// <summary>
        /// Load RewriterConfiguration Instance to XmlNode
        /// </summary>
        /// <param name="node">XmlNode</param>
        /// <returns></returns>
        public static RewriterConfiguration LoadFromNode(XmlNode node)
        {
            RewriterConfiguration configuration = RewriterConfigurationReader.Read(node);

            //HttpRuntime.Cache.Add(_cacheName, configuration, null, DateTime.Now.AddHours(1.0), TimeSpan.Zero, CacheItemPriority.Normal, null);
            return(configuration);
        }
Example #2
0
        /// <summary>
        /// Loads the rewriter configuration from the web.config file.
        /// </summary>
        private void LoadFromConfig()
        {
            var section = _configurationManager.GetSection(Constants.RewriterNode) as XmlNode;

            if (section == null)
            {
                throw new ConfigurationErrorsException(MessageProvider.FormatString(Message.MissingConfigFileSection, Constants.RewriterNode), section);
            }

            RewriterConfigurationReader.Read(this, section);
        }
 /// <summary>
 /// Loads the configuration from an XML node.
 /// </summary>
 /// <param name="node">The XML node to load configuration from.</param>
 /// <returns>The configuration.</returns>
 public static RewriterConfiguration LoadFromNode(XmlNode node)
 {
     return((RewriterConfiguration)RewriterConfigurationReader.Read(node));
 }