/// <summary> /// Returns true if DelegationExtensionEstimate instances are equal /// </summary> /// <param name="other">Instance of DelegationExtensionEstimate to be compared</param> /// <returns>Boolean</returns> public bool Equals(DelegationExtensionEstimate other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( DelegationId == other.DelegationId || DelegationId != null && DelegationId.Equals(other.DelegationId) ) && ( VestsDelegated == other.VestsDelegated || VestsDelegated != null && VestsDelegated.Equals(other.VestsDelegated) ) && ( SteemPowerDelegated == other.SteemPowerDelegated || SteemPowerDelegated != null && SteemPowerDelegated.Equals(other.SteemPowerDelegated) ) && ( SteemAccount == other.SteemAccount || SteemAccount != null && SteemAccount.Equals(other.SteemAccount) ) && ( EndTime == other.EndTime || EndTime != null && EndTime.Equals(other.EndTime) ) && ( InputCoinType == other.InputCoinType || InputCoinType != null && InputCoinType.Equals(other.InputCoinType) ) && ( CostFor30DayExtension == other.CostFor30DayExtension || CostFor30DayExtension != null && CostFor30DayExtension.Equals(other.CostFor30DayExtension) ) && ( CostFor90DayExtension == other.CostFor90DayExtension || CostFor90DayExtension != null && CostFor90DayExtension.Equals(other.CostFor90DayExtension) )); }
/// <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 (DelegationId != null) { hashCode = hashCode * 59 + DelegationId.GetHashCode(); } if (VestsDelegated != null) { hashCode = hashCode * 59 + VestsDelegated.GetHashCode(); } if (SteemPowerDelegated != null) { hashCode = hashCode * 59 + SteemPowerDelegated.GetHashCode(); } if (SteemAccount != null) { hashCode = hashCode * 59 + SteemAccount.GetHashCode(); } if (EndTime != null) { hashCode = hashCode * 59 + EndTime.GetHashCode(); } if (InputCoinType != null) { hashCode = hashCode * 59 + InputCoinType.GetHashCode(); } if (CostFor30DayExtension != null) { hashCode = hashCode * 59 + CostFor30DayExtension.GetHashCode(); } if (CostFor90DayExtension != null) { hashCode = hashCode * 59 + CostFor90DayExtension.GetHashCode(); } return(hashCode); } }