예제 #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
파일: BaseSetting.cs 프로젝트: hzl091/wcf
 protected virtual InitConfig SetConfigSitting(InitConfig configsitting)
 {
     return(getConfigSitting = configsitting);
 }