示例#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 (Class != null)
                {
                    hashCode = hashCode * 59 + Class.GetHashCode();
                }
                if (Actions != null)
                {
                    hashCode = hashCode * 59 + Actions.GetHashCode();
                }

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

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

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

                hashCode = hashCode * 59 + InQueueSince.GetHashCode();
                if (Params != null)
                {
                    hashCode = hashCode * 59 + Params.GetHashCode();
                }

                hashCode = hashCode * 59 + Stuck.GetHashCode();
                if (Task != null)
                {
                    hashCode = hashCode * 59 + Task.GetHashCode();
                }
                if (Url != null)
                {
                    hashCode = hashCode * 59 + Url.GetHashCode();
                }
                if (Why != null)
                {
                    hashCode = hashCode * 59 + Why.GetHashCode();
                }

                hashCode = hashCode * 59 + Cancelled.GetHashCode();
                if (Executable != null)
                {
                    hashCode = hashCode * 59 + Executable.GetHashCode();
                }
                return(hashCode);
            }
        }
示例#2
0
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (TransactionDateOccured?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Status?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Shipped.GetHashCode());
            hashCode = hashCode * -1521134295 + (Invoiced.GetHashCode());
            hashCode = hashCode * -1521134295 + (ShippedDateOccured?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (InvoicedDateOccured?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Cancelled.GetHashCode());
            hashCode = hashCode * -1521134295 + (InTransit.GetHashCode());
            hashCode = hashCode * -1521134295 + (Picked.GetHashCode());
            hashCode = hashCode * -1521134295 + (PaymentStatus.GetHashCode());
            hashCode = hashCode * -1521134295 + (InitialOrderDate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (FinalOrderDate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Delivered.GetHashCode());
            hashCode = hashCode * -1521134295 + (Ordered.GetHashCode());
            return(hashCode);
        }