摘要:
在2.0中已经不建议使用 IConfigurationSectionHandler 接口来实现自定义配置节,而是改用创建 ConfigurationSection 的派生类来创建自定义配置节。现在我希望的配置文件的结构如下:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlight... 阅读全文
摘要:
1、属性大小写问题 比如有这样一个配置节,其中有三个属性name,ip,port <Server name="server1" ip="192.168.0.11" port="80" /> 那么对应的类要跟这个名字完全匹配,包括大小写。 public class Server : ConfigurationElement{ [ConfigurationProperty("name",... 阅读全文
摘要:
I recently had to deal with creating custom sections in the web/app.config file. In the .NET 1.x realm, I had to create a section handler which implements public class CustomSectionHandler: IConfigura... 阅读全文