예제 #1
0
        /// <summary>
        /// Verifies that a record's in use status is in line with the mode, might throw <seealso cref="InvalidRecordException"/>.
        /// </summary>
        public bool Verify(AbstractBaseRecord record)
        {
            bool inUse = record.InUse();

            if (this == NORMAL & !inUse)
            {
                throw new InvalidRecordException(record + " not in use");
            }
            return(this == FORCE | inUse);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }
            AbstractBaseRecord other = ( AbstractBaseRecord )obj;

            return(_id == other._id);
        }