示例#1
0
        /// <summary>
        /// 重载IConfigurationSectionHandler读取Section配值
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="configContext"></param>
        /// <param name="section"></param>
        /// <returns></returns>
        public object Create(object parent, object configContext, XmlNode section)
        {
            var config = new InitConfig();

            XmlNodeList list = section.ChildNodes;

            mlist = new List <SittConfigSection <XmlAttributeCollection> >();
            //Section的列表存入list列表中
            foreach (XmlNode node in list)
            {
                if (node.NodeType != XmlNodeType.Comment)
                {
                    mlist.Add(new SittConfigSection <XmlAttributeCollection>()
                    {
                        Key   = node.Name,
                        Value = node.Attributes
                    });
                }
            }


            return(config);
        }
示例#2
0
 protected virtual InitConfig SetConfigSitting(InitConfig configsitting)
 {
     return(getConfigSitting = configsitting);
 }