Exemplo n.º 1
0
        /// <summary>
        /// Compares for reference AND value equality.
        /// </summary>
        /// <param name="obj">The object to compare with this instance.</param>
        /// <returns>
        /// 	<c>true</c> if both operands are equal; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(EntityType obj)
        {
            bool ivarsEqual = true;

            if (obj.GetType() != this.GetType())
            {
                return false;
            }

            if (this._entityKind != obj._entityKind)
            {
                ivarsEqual = false;
            }

            if (this._domain != obj._domain)
            {
                ivarsEqual = false;
            }

            if (this._country != obj._country)
            {
                ivarsEqual = false;
            }

            if (this._category != obj._category)
            {
                ivarsEqual = false;
            }

            if (this._subcategory != obj._subcategory)
            {
                ivarsEqual = false;
            }

            if (this._specific != obj._specific)
            {
                ivarsEqual = false;
            }

            if (this._extra != obj._extra)
            {
                ivarsEqual = false;
            }

            return ivarsEqual;
        }