/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (HistoryText != null) { hash = hash * 59 + HistoryText.GetHashCode(); } if (LastUpdateUserid != null) { hash = hash * 59 + LastUpdateUserid.GetHashCode(); } if (LastUpdateTimestamp != null) { hash = hash * 59 + LastUpdateTimestamp.GetHashCode(); } if (AffectedEntityId != null) { hash = hash * 59 + AffectedEntityId.GetHashCode(); } return(hash); } }
/// <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); } }