Exemplo n.º 1
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (UpdatedTimestamp != null)
                {
                    hashCode = hashCode * 59 + UpdatedTimestamp.GetHashCode();
                }

                hashCode = hashCode * 59 + State.GetHashCode();
                if (ReceivedTimestamp != null)
                {
                    hashCode = hashCode * 59 + ReceivedTimestamp.GetHashCode();
                }

                hashCode = hashCode * 59 + Currency.GetHashCode();
                if (Address != null)
                {
                    hashCode = hashCode * 59 + Address.GetHashCode();
                }
                if (Amount != null)
                {
                    hashCode = hashCode * 59 + Amount.GetHashCode();
                }
                if (TransactionId != null)
                {
                    hashCode = hashCode * 59 + TransactionId.GetHashCode();
                }
                return(hashCode);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (UpdatedTimestamp != null)
                {
                    hashCode = hashCode * 59 + UpdatedTimestamp.GetHashCode();
                }

                hashCode = hashCode * 59 + Direction.GetHashCode();
                if (Amount != null)
                {
                    hashCode = hashCode * 59 + Amount.GetHashCode();
                }
                if (OtherSide != null)
                {
                    hashCode = hashCode * 59 + OtherSide.GetHashCode();
                }

                hashCode = hashCode * 59 + Currency.GetHashCode();

                hashCode = hashCode * 59 + State.GetHashCode();
                if (CreatedTimestamp != null)
                {
                    hashCode = hashCode * 59 + CreatedTimestamp.GetHashCode();
                }

                hashCode = hashCode * 59 + Type.GetHashCode();
                if (Id != null)
                {
                    hashCode = hashCode * 59 + Id.GetHashCode();
                }
                return(hashCode);
            }
        }