MergeObjects() public method

Merge the objects from this collection into the new one. Skip the specified object.
public MergeObjects ( IPersistenceLocation location, String skip ) : void
location IPersistenceLocation The location to merge to.
skip String The object to skip.
return void
        /// <summary>
        /// Delete the specified object.
        /// </summary>
        /// <param name="name">The object name.</param>
        public void Delete(String name)
        {
            PersistWriter writer = new PersistWriter(this.fileTemp);

            writer.Begin();
            writer.WriteHeader();
            writer.BeginObjects();
            writer.MergeObjects(this.filePrimary, name);
            writer.EndObjects();
            writer.End();
            writer.Close();
            MergeTemp();
            foreach (DirectoryEntry d in this.directory)
            {
                if (d.Name.Equals(name))
                {
                    this.directory.Remove(d);
                    break;
                }
            }
        }
        /// <summary>
        /// Add an EncogPersistedObject to the collection.
        /// </summary>
        /// <param name="name">The name of the object to load.</param>
        /// <param name="obj">The object to add.</param>
        public void Add(String name, IEncogPersistedObject obj)
        {
            if (obj is BasicNetwork)
            {
                ((BasicNetwork)obj).Structure.UpdateFlatNetwork();
            }

            obj.Name = name;
            PersistWriter writer = new PersistWriter(this.fileTemp);

            writer.Begin();
            writer.WriteHeader();
            writer.BeginObjects();
            writer.WriteObject(obj);
            writer.MergeObjects(this.filePrimary, name);
            writer.EndObjects();
            writer.End();
            writer.Close();
            MergeTemp();
            BuildDirectory();
        }
 /// <summary>
 /// Delete the specified object.
 /// </summary>
 /// <param name="name">The object name.</param>
 public void Delete(String name)
 {
     PersistWriter writer = new PersistWriter(this.fileTemp);
     writer.Begin();
     writer.WriteHeader();
     writer.BeginObjects();
     writer.MergeObjects(this.filePrimary, name);
     writer.EndObjects();
     writer.End();
     writer.Close();
     MergeTemp();
     foreach (DirectoryEntry d in this.directory )
     {
         if (d.Name.Equals(name))
         {
             this.directory.Remove(d);
             break;
         }
     }
 }
        /// <summary>
        /// Add an EncogPersistedObject to the collection.
        /// </summary>
        /// <param name="name">The name of the object to load.</param>
        /// <param name="obj">The object to add.</param>
        public void Add(String name, IEncogPersistedObject obj)
        {
            if (obj is BasicNetwork)
            {
                ((BasicNetwork)obj).Structure.UpdateFlatNetwork();
            }

            obj.Name = name;
            PersistWriter writer = new PersistWriter(this.fileTemp);
            writer.Begin();
            writer.WriteHeader();
            writer.BeginObjects();
            writer.WriteObject(obj);
            writer.MergeObjects(this.filePrimary, name);
            writer.EndObjects();
            writer.End();
            writer.Close();
            MergeTemp();
            BuildDirectory();
        }