pageproperties.cs
来自「Professional ASP.NET source code」· CS 代码 · 共 34 行
CS
34 行
using System;
using System.Collections;
using System.Xml;
using System.Configuration;
using System.Web.Configuration;
namespace Wrox {
internal class PagePropertiesHandler : IConfigurationSectionHandler {
public virtual object Create(Object parent, Object context, XmlNode node) {
PagePropertiesConfig config = new PagePropertiesConfig((PagePropertiesConfig)parent);
config.LoadValuesFromConfigurationXml(node);
return config;
}
}
public class PagePropertiesConfig {
string _backColor;
internal PagePropertiesConfig(PagePropertiesConfig parent) {
if (parent != null)
_backColor = parent._backColor;
}
internal void LoadValuesFromConfigurationXml(XmlNode node) {
//Exception error = null;
XmlAttributeCollection attributeCollection = node.Attributes;
_backColor = attributeCollection["backColor"].Value;
}
public string BackColor{
get {return _backColor;}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?