예제 #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 (IsValid != null)
         {
             hashCode = hashCode * 59 + IsValid.GetHashCode();
         }
         if (IsAccount != null)
         {
             hashCode = hashCode * 59 + IsAccount.GetHashCode();
         }
         if (IsBlacklisted != null)
         {
             hashCode = hashCode * 59 + IsBlacklisted.GetHashCode();
         }
         if (Avatar != null)
         {
             hashCode = hashCode * 59 + Avatar.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (AccountNumber != null)
         {
             hashCode = hashCode * 59 + AccountNumber.GetHashCode();
         }
         if (CorrectAddress != null)
         {
             hashCode = hashCode * 59 + CorrectAddress.GetHashCode();
         }
         if (MemoExpected != null)
         {
             hashCode = hashCode * 59 + MemoExpected.GetHashCode();
         }
         if (MemoPlaceholderText != null)
         {
             hashCode = hashCode * 59 + MemoPlaceholderText.GetHashCode();
         }
         if (SimilarToExistingService != null)
         {
             hashCode = hashCode * 59 + SimilarToExistingService.GetHashCode();
         }
         if (Balances != null)
         {
             hashCode = hashCode * 59 + Balances.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #2
0
        /// <summary>
        /// Returns true if OutputAddressValidationInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of OutputAddressValidationInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OutputAddressValidationInfo other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     IsValid == other.IsValid ||
                     IsValid != null &&
                     IsValid.Equals(other.IsValid)
                     ) &&
                 (
                     IsAccount == other.IsAccount ||
                     IsAccount != null &&
                     IsAccount.Equals(other.IsAccount)
                 ) &&
                 (
                     IsBlacklisted == other.IsBlacklisted ||
                     IsBlacklisted != null &&
                     IsBlacklisted.Equals(other.IsBlacklisted)
                 ) &&
                 (
                     Avatar == other.Avatar ||
                     Avatar != null &&
                     Avatar.Equals(other.Avatar)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     AccountNumber == other.AccountNumber ||
                     AccountNumber != null &&
                     AccountNumber.Equals(other.AccountNumber)
                 ) &&
                 (
                     CorrectAddress == other.CorrectAddress ||
                     CorrectAddress != null &&
                     CorrectAddress.Equals(other.CorrectAddress)
                 ) &&
                 (
                     MemoExpected == other.MemoExpected ||
                     MemoExpected != null &&
                     MemoExpected.Equals(other.MemoExpected)
                 ) &&
                 (
                     MemoPlaceholderText == other.MemoPlaceholderText ||
                     MemoPlaceholderText != null &&
                     MemoPlaceholderText.Equals(other.MemoPlaceholderText)
                 ) &&
                 (
                     SimilarToExistingService == other.SimilarToExistingService ||
                     SimilarToExistingService != null &&
                     SimilarToExistingService.Equals(other.SimilarToExistingService)
                 ) &&
                 (
                     Balances == other.Balances ||
                     Balances != null &&
                     Balances.Equals(other.Balances)
                 ));
        }