Ejemplo n.º 1
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();

                if (HistoryText != null)
                {
                    hash = hash * 59 + HistoryText.GetHashCode();
                }

                if (LastUpdateUserid != null)
                {
                    hash = hash * 59 + LastUpdateUserid.GetHashCode();
                }

                if (LastUpdateTimestamp != null)
                {
                    hash = hash * 59 + LastUpdateTimestamp.GetHashCode();
                }

                if (AffectedEntityId != null)
                {
                    hash = hash * 59 + AffectedEntityId.GetHashCode();
                }

                return(hash);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();

                if (HistoryText != null)
                {
                    hash = hash * 59 + HistoryText.GetHashCode();
                }

                if (CreatedDate != null)
                {
                    hash = hash * 59 + CreatedDate.GetHashCode();
                }

                return(hash);
            }
        }