Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (TransactionId != null ? TransactionId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Hash != null ? Hash.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Size.GetHashCode();
         hashCode = (hashCode * 397) ^ Vsize.GetHashCode();
         hashCode = (hashCode * 397) ^ Version.GetHashCode();
         hashCode = (hashCode * 397) ^ LockTime.GetHashCode();
         hashCode = (hashCode * 397) ^ (Blockhash != null ? Blockhash.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ BlockNumber.GetHashCode();
         hashCode = (hashCode * 397) ^ Confirmations.GetHashCode();
         hashCode = (hashCode * 397) ^ (Time != null ? Time.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (VIn != null ? VIn.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (VOut != null ? VOut.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Chain != null ? Chain.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TokenTransfers != null ? TokenTransfers.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Index;
         hashCode = (hashCode * 397) ^ (TransactionHash != null ? TransactionHash.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Value.GetHashCode();
         hashCode = (hashCode * 397) ^ (FromAddress != null ? FromAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ToAddress != null ? ToAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Date != null ? Date.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BlockHash != null ? BlockHash.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ BlockNumber.GetHashCode();
         hashCode = (hashCode * 397) ^ Gas.GetHashCode();
         hashCode = (hashCode * 397) ^ GasPrice.GetHashCode();
         hashCode = (hashCode * 397) ^ GasUsed.GetHashCode();
         hashCode = (hashCode * 397) ^ Nonce.GetHashCode();
         hashCode = (hashCode * 397) ^ Confirmations.GetHashCode();
         hashCode = (hashCode * 397) ^ (Input != null ? Input.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 3
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();
                hash = hash * 59 + StartDate.GetHashCode();
                hash = hash * 59 + EndDate.GetHashCode();

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

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

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

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

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

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

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

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

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

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

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

                return(hash);
            }
        }