Beispiel #1
0
 protected override void Unmerge(ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
 {
     if (sourceElement != null)
     {
         XmlElementElementCollection elements  = (XmlElementElementCollection)sourceElement;
         XmlElementElementCollection elements2 = (XmlElementElementCollection)parentElement;
         for (int i = 0; i < elements.Count; i++)
         {
             XmlElementElement element = elements[i];
             if ((elements2 == null) || !elements2.ContainsKey(this.GetElementKey(element)))
             {
                 XmlElementElement element2 = new XmlElementElement();
                 element2.ResetInternal(element);
                 base.Add(element2);
             }
         }
     }
 }
 protected override void Unmerge(ConfigurationElement sourceElement,
                                 ConfigurationElement parentElement,
                                 ConfigurationSaveMode saveMode)
 {
     if (sourceElement != null)
     {
         // Just copy from parent to here--
         XmlElementElementCollection source = (XmlElementElementCollection)sourceElement;
         XmlElementElementCollection parent = (XmlElementElementCollection)parentElement;
         for (int i = 0; i < source.Count; ++i)
         {
             XmlElementElement element = source[i];
             if ((parent == null) || !parent.ContainsKey(this.GetElementKey(element)))
             {
                 XmlElementElement xmlElement = new XmlElementElement();
                 xmlElement.ResetInternal(element);
                 this.Add(xmlElement);
             }
         }
     }
 }