Esempio n. 1
0
 /// <summary>
 /// 使用父元素构造, xmlreader指向当前对应的元素
 /// </summary>
 public XmlConfiguration(XmlReader reader, XmlConfiguration parent, int index)
 {
     if (parent == null)
     {
         throw new ConfigurationException(null, "xml configuration element's parent must not be null");
     }
     this.reader = reader;
     this.parent = parent;
     this.index = index;
     this.owner = FindResource();
     ReadSection(reader);
 }
Esempio n. 2
0
 public IConfiguration[] Children()
 {
     if (childReader == null)
         return new IConfiguration[0];
     List<IConfiguration> list = new List<IConfiguration>();
     for (int i = 0; childReader.Read() == true; i++)
     {
         XmlConfiguration conf = new XmlConfiguration(childReader, this, i);
         list.Add(conf);
     }
     return list.ToArray();
 }