예제 #1
0
 /// <summary>
 /// Removes the specified entry.
 /// </summary>
 /// <param name="entry">The entry.</param>
 public void Remove(EntryNode entry)
 {
     _property_table.RemoveProperty(entry.Property);
     if (entry.IsDocumentEntry)
     {
         _documents.Remove((( DocumentNode )entry).Document);
     }
 }
예제 #2
0
        /// <summary>
        /// Change a contained Entry's name
        /// </summary>
        /// <param name="oldName">the original name</param>
        /// <param name="newName">the new name</param>
        /// <returns>true if the operation succeeded, else false</returns>
        public bool ChangeName(String oldName, String newName)
        {
            bool      rval  = false;
            EntryNode child = (EntryNode)_byname[oldName];

            if (child != null)
            {
                rval = ((DirectoryProperty)Property)
                       .ChangeName(child.Property, newName);
                if (rval)
                {
                    _byname.Remove(oldName);
                    _byname[child.Property.Name] = child;
                }
            }
            return(rval);
        }
예제 #3
0
        /// <summary>
        /// Deletes the entry.
        /// </summary>
        /// <param name="entry">the EntryNode to be Deleted</param>
        /// <returns>true if the entry was Deleted, else false</returns>
        public bool DeleteEntry(EntryNode entry)
        {
            bool rval =
                ((DirectoryProperty)Property)
                .DeleteChild(entry.Property);

            if (rval)
            {
                _entries.Remove(entry);
                _byname.Remove(entry.Name);

                if (_oFilesSystem != null)
                {
                    _oFilesSystem.Remove(entry);
                }
                else
                {
                    _nFilesSystem.Remove(entry);
                }
            }
            return(rval);
        }
예제 #4
0
        /**
         * remove an entry
         *
         * @param entry to be Removed
         */

        public void Remove(EntryNode entry)
        {
            _property_table.RemoveProperty(entry.Property);
        }