rewriterconfigserializersectionhandler.cs
来自「1、用SQL查询器打开install目录下的dooogo.sql运行之后创建数据」· CS 代码 · 共 31 行
CS
31 行
using System;
using System.Configuration;
using System.Xml;
using System.Xml.Serialization;
using System.Xml.XPath;
namespace Club.Common.URLRewriter.Config
{
/// <summary>
/// Deserializes the markup in Web.config into an instance of the <see cref="RewriterConfiguration"/> class.
/// </summary>
public class RewriterConfigSerializerSectionHandler : IConfigurationSectionHandler
{
/// <summary>
/// Creates an instance of the <see cref="RewriterConfiguration"/> class.
/// </summary>
/// <remarks>Uses XML Serialization to deserialize the XML in the Web.config file into an
/// <see cref="RewriterConfiguration"/> instance.</remarks>
/// <returns>An instance of the <see cref="RewriterConfiguration"/> class.</returns>
public object Create(object parent, object configContext, System.Xml.XmlNode section)
{
// Create an instance of XmlSerializer based on the RewriterConfiguration type...
XmlSerializer ser = new XmlSerializer(typeof(RewriterConfiguration));
// Return the Deserialized object from the Web.config XML
return ser.Deserialize(new XmlNodeReader(section));
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?