Beispiel #1
0
        /// <summary>
        /// Returns true if InitiateFixedPriceTradeModel1 instances are equal
        /// </summary>
        /// <param name="other">Instance of InitiateFixedPriceTradeModel1 to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(InitiateFixedPriceTradeModel1 other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     InputCoinType == other.InputCoinType ||
                     InputCoinType != null &&
                     InputCoinType.Equals(other.InputCoinType)
                     ) &&
                 (
                     OutputCoinType == other.OutputCoinType ||
                     OutputCoinType != null &&
                     OutputCoinType.Equals(other.OutputCoinType)
                 ) &&
                 (
                     OutputAddress == other.OutputAddress ||
                     OutputAddress != null &&
                     OutputAddress.Equals(other.OutputAddress)
                 ) &&
                 (
                     DesiredOutputAmount == other.DesiredOutputAmount ||
                     DesiredOutputAmount != null &&
                     DesiredOutputAmount.Equals(other.DesiredOutputAmount)
                 ) &&
                 (
                     AllOrNothing == other.AllOrNothing ||
                     AllOrNothing != null &&
                     AllOrNothing.Equals(other.AllOrNothing)
                 ) &&
                 (
                     OutputMemo == other.OutputMemo ||
                     OutputMemo != null &&
                     OutputMemo.Equals(other.OutputMemo)
                 ) &&
                 (
                     RefundAddress == other.RefundAddress ||
                     RefundAddress != null &&
                     RefundAddress.Equals(other.RefundAddress)
                 ) &&
                 (
                     InputAddressType == other.InputAddressType ||
                     InputAddressType != null &&
                     InputAddressType.Equals(other.InputAddressType)
                 ) &&
                 (
                     RefundMemo == other.RefundMemo ||
                     RefundMemo != null &&
                     RefundMemo.Equals(other.RefundMemo)
                 ));
        }
Beispiel #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 (InputCoinType != null)
         {
             hashCode = hashCode * 59 + InputCoinType.GetHashCode();
         }
         if (OutputCoinType != null)
         {
             hashCode = hashCode * 59 + OutputCoinType.GetHashCode();
         }
         if (OutputAddress != null)
         {
             hashCode = hashCode * 59 + OutputAddress.GetHashCode();
         }
         if (DesiredOutputAmount != null)
         {
             hashCode = hashCode * 59 + DesiredOutputAmount.GetHashCode();
         }
         if (AllOrNothing != null)
         {
             hashCode = hashCode * 59 + AllOrNothing.GetHashCode();
         }
         if (OutputMemo != null)
         {
             hashCode = hashCode * 59 + OutputMemo.GetHashCode();
         }
         if (RefundAddress != null)
         {
             hashCode = hashCode * 59 + RefundAddress.GetHashCode();
         }
         if (InputAddressType != null)
         {
             hashCode = hashCode * 59 + InputAddressType.GetHashCode();
         }
         if (RefundMemo != null)
         {
             hashCode = hashCode * 59 + RefundMemo.GetHashCode();
         }
         return(hashCode);
     }
 }