Exemple #1
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
                {
                    try
                    {
                        _nFilesSystem.Remove(entry);
                    }
                    catch (IOException)
                    {
                        // TODO Work out how to report this, given we can't change the method signature...
                    }
                }
            }
            return(rval);
        }
Exemple #2
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);
        }