Esempio n. 1
0
        /// <summary>
        ///   Removes a single record from the Document
        /// </summary>
        /// <param name = "record"></param>
        public void RemoveRecord(GEDCOMRecord record)
        {
            Requires.NotNull("record", record);

            if (_records.Remove(record))
            {
                //clear the assoicated RecordList so it is refreshed next time around
                ClearList(record.TagName);
            }
            else
            {
                throw new ArgumentOutOfRangeException();
            }
        }
        /// <summary>
        ///   Removes a single record from the Document
        /// </summary>
        /// <param name = "record"></param>
        public void RemoveRecord(GEDCOMRecord record)
        {
            if (record == null)
            {
                throw new ArgumentNullException(typeof(GEDCOMRecord).Name);
            }

            if (_records.Remove(record))
            {
                //clear the assoicated RecordList so it is refreshed next time around
                ClearList(record.TagName);
            }
            else
            {
                throw new ArgumentOutOfRangeException();
            }
        }