Beispiel #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 (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);
     }
 }