Пример #1
0
 /// <summary>
 /// Performs a <b>deep clone</b> of the complete subtree (children and
 /// qualifier )into and add it to the destination node.
 /// </summary>
 /// <param name="destination">the node to add the cloned subtree</param>
 public virtual void CloneSubtree(Com.Adobe.Xmp.Impl.XMPNode destination)
 {
     try
     {
         for (Iterator it = IterateChildren(); it.HasNext(); )
         {
             Com.Adobe.Xmp.Impl.XMPNode child = (Com.Adobe.Xmp.Impl.XMPNode)it.Next();
             destination.AddChild((Com.Adobe.Xmp.Impl.XMPNode)child.Clone());
         }
         for (Iterator it_1 = IterateQualifier(); it_1.HasNext(); )
         {
             Com.Adobe.Xmp.Impl.XMPNode qualifier = (Com.Adobe.Xmp.Impl.XMPNode)it_1.Next();
             destination.AddQualifier((Com.Adobe.Xmp.Impl.XMPNode)qualifier.Clone());
         }
     }
     catch (XMPException)
     {
         // cannot happen (duplicate childs/quals do not exist in this node)
         System.Diagnostics.Debug.Assert(false);
     }
 }