public override int GetHashCode() { var hashCode = 1936142708; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Status); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(InitMarginBefore); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(MaintMarginBefore); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(EquityWithLoanBefore); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(InitMarginChange); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(MaintMarginChange); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(EquityWithLoanChange); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(InitMarginAfter); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(MaintMarginAfter); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(EquityWithLoanAfter); hashCode = hashCode * -1521134295 + Commission.GetHashCode(); hashCode = hashCode * -1521134295 + MinCommission.GetHashCode(); hashCode = hashCode * -1521134295 + MaxCommission.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(CommissionCurrency); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(WarningText); return(hashCode); }
public override int GetHashCode() { var hashCode = -2052112293; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ExecId); hashCode = hashCode * -1521134295 + Commission.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Currency); hashCode = hashCode * -1521134295 + RealizedPnl.GetHashCode(); hashCode = hashCode * -1521134295 + Yield.GetHashCode(); hashCode = hashCode * -1521134295 + YieldRedemptionDate.GetHashCode(); return(hashCode); }
/// <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 :) hashCode = hashCode * 59 + Direction.GetHashCode(); if (ReduceOnly != null) { hashCode = hashCode * 59 + ReduceOnly.GetHashCode(); } if (Triggered != null) { hashCode = hashCode * 59 + Triggered.GetHashCode(); } if (OrderId != null) { hashCode = hashCode * 59 + OrderId.GetHashCode(); } if (Price != null) { hashCode = hashCode * 59 + Price.GetHashCode(); } hashCode = hashCode * 59 + TimeInForce.GetHashCode(); if (Api != null) { hashCode = hashCode * 59 + Api.GetHashCode(); } hashCode = hashCode * 59 + OrderState.GetHashCode(); if (Implv != null) { hashCode = hashCode * 59 + Implv.GetHashCode(); } hashCode = hashCode * 59 + Advanced.GetHashCode(); if (PostOnly != null) { hashCode = hashCode * 59 + PostOnly.GetHashCode(); } if (Usd != null) { hashCode = hashCode * 59 + Usd.GetHashCode(); } if (StopPrice != null) { hashCode = hashCode * 59 + StopPrice.GetHashCode(); } hashCode = hashCode * 59 + OrderType.GetHashCode(); if (LastUpdateTimestamp != null) { hashCode = hashCode * 59 + LastUpdateTimestamp.GetHashCode(); } hashCode = hashCode * 59 + OriginalOrderType.GetHashCode(); if (MaxShow != null) { hashCode = hashCode * 59 + MaxShow.GetHashCode(); } if (ProfitLoss != null) { hashCode = hashCode * 59 + ProfitLoss.GetHashCode(); } if (IsLiquidation != null) { hashCode = hashCode * 59 + IsLiquidation.GetHashCode(); } if (FilledAmount != null) { hashCode = hashCode * 59 + FilledAmount.GetHashCode(); } if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Commission != null) { hashCode = hashCode * 59 + Commission.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } hashCode = hashCode * 59 + Trigger.GetHashCode(); if (InstrumentName != null) { hashCode = hashCode * 59 + InstrumentName.GetHashCode(); } if (CreationTimestamp != null) { hashCode = hashCode * 59 + CreationTimestamp.GetHashCode(); } if (AveragePrice != null) { hashCode = hashCode * 59 + AveragePrice.GetHashCode(); } return(hashCode); } }