/// <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 (WalletType != null) { hashCode = hashCode * 59 + WalletType.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (SupportsInputToUniqueAddress != null) { hashCode = hashCode * 59 + SupportsInputToUniqueAddress.GetHashCode(); } if (SupportsInputToSharedAddressWithMemo != null) { hashCode = hashCode * 59 + SupportsInputToSharedAddressWithMemo.GetHashCode(); } if (DefaultInputAddressType != null) { hashCode = hashCode * 59 + DefaultInputAddressType.GetHashCode(); } if (ExtraData != null) { hashCode = hashCode * 59 + ExtraData.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if WalletInfo instances are equal /// </summary> /// <param name="other">Instance of WalletInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(WalletInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( WalletType == other.WalletType || WalletType != null && WalletType.Equals(other.WalletType) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( SupportsInputToUniqueAddress == other.SupportsInputToUniqueAddress || SupportsInputToUniqueAddress != null && SupportsInputToUniqueAddress.Equals(other.SupportsInputToUniqueAddress) ) && ( SupportsInputToSharedAddressWithMemo == other.SupportsInputToSharedAddressWithMemo || SupportsInputToSharedAddressWithMemo != null && SupportsInputToSharedAddressWithMemo.Equals(other.SupportsInputToSharedAddressWithMemo) ) && ( DefaultInputAddressType == other.DefaultInputAddressType || DefaultInputAddressType != null && DefaultInputAddressType.Equals(other.DefaultInputAddressType) ) && ( ExtraData == other.ExtraData || ExtraData != null && ExtraData.Equals(other.ExtraData) )); }