/// <summary> /// Returns true if Order instances are equal /// </summary> /// <param name="other">Instance of Order to be compared</param> /// <returns>Boolean</returns> public bool Equals(Order other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Direction == other.Direction || Direction.Equals(other.Direction) ) && ( ReduceOnly == other.ReduceOnly || ReduceOnly != null && ReduceOnly.Equals(other.ReduceOnly) ) && ( Triggered == other.Triggered || Triggered != null && Triggered.Equals(other.Triggered) ) && ( OrderId == other.OrderId || OrderId != null && OrderId.Equals(other.OrderId) ) && ( Price == other.Price || Price != null && Price.Equals(other.Price) ) && ( TimeInForce == other.TimeInForce || TimeInForce.Equals(other.TimeInForce) ) && ( Api == other.Api || Api != null && Api.Equals(other.Api) ) && ( OrderState == other.OrderState || OrderState.Equals(other.OrderState) ) && ( Implv == other.Implv || Implv != null && Implv.Equals(other.Implv) ) && ( Advanced == other.Advanced || Advanced.Equals(other.Advanced) ) && ( PostOnly == other.PostOnly || PostOnly != null && PostOnly.Equals(other.PostOnly) ) && ( Usd == other.Usd || Usd != null && Usd.Equals(other.Usd) ) && ( StopPrice == other.StopPrice || StopPrice != null && StopPrice.Equals(other.StopPrice) ) && ( OrderType == other.OrderType || OrderType.Equals(other.OrderType) ) && ( LastUpdateTimestamp == other.LastUpdateTimestamp || LastUpdateTimestamp != null && LastUpdateTimestamp.Equals(other.LastUpdateTimestamp) ) && ( OriginalOrderType == other.OriginalOrderType || OriginalOrderType.Equals(other.OriginalOrderType) ) && ( MaxShow == other.MaxShow || MaxShow != null && MaxShow.Equals(other.MaxShow) ) && ( ProfitLoss == other.ProfitLoss || ProfitLoss != null && ProfitLoss.Equals(other.ProfitLoss) ) && ( IsLiquidation == other.IsLiquidation || IsLiquidation != null && IsLiquidation.Equals(other.IsLiquidation) ) && ( FilledAmount == other.FilledAmount || FilledAmount != null && FilledAmount.Equals(other.FilledAmount) ) && ( Label == other.Label || Label != null && Label.Equals(other.Label) ) && ( Commission == other.Commission || Commission != null && Commission.Equals(other.Commission) ) && ( Amount == other.Amount || Amount != null && Amount.Equals(other.Amount) ) && ( Trigger == other.Trigger || Trigger.Equals(other.Trigger) ) && ( InstrumentName == other.InstrumentName || InstrumentName != null && InstrumentName.Equals(other.InstrumentName) ) && ( CreationTimestamp == other.CreationTimestamp || CreationTimestamp != null && CreationTimestamp.Equals(other.CreationTimestamp) ) && ( AveragePrice == other.AveragePrice || AveragePrice != null && AveragePrice.Equals(other.AveragePrice) )); }
/// <summary> /// Returns true if OrderRes instances are equal /// </summary> /// <param name="input">Instance of OrderRes to be compared</param> /// <returns>Boolean</returns> public bool Equals(OrderRes input) { if (input == null) { return(false); } return(( OrderId == input.OrderId || (OrderId != null && OrderId.Equals(input.OrderId)) ) && ( UserId == input.UserId || (UserId != null && UserId.Equals(input.UserId)) ) && ( Symbol == input.Symbol || (Symbol != null && Symbol.Equals(input.Symbol)) ) && ( Side == input.Side || (Side != null && Side.Equals(input.Side)) ) && ( OrderType == input.OrderType || (OrderType != null && OrderType.Equals(input.OrderType)) ) && ( Price == input.Price || (Price != null && Price.Equals(input.Price)) ) && ( TimeInForce == input.TimeInForce || (TimeInForce != null && TimeInForce.Equals(input.TimeInForce)) ) && ( OrderStatus == input.OrderStatus || (OrderStatus != null && OrderStatus.Equals(input.OrderStatus)) ) && ( LastExecTime == input.LastExecTime || (LastExecTime != null && LastExecTime.Equals(input.LastExecTime)) ) && ( LastExecPrice == input.LastExecPrice || (LastExecPrice != null && LastExecPrice.Equals(input.LastExecPrice)) ) && ( LeavesQty == input.LeavesQty || (LeavesQty != null && LeavesQty.Equals(input.LeavesQty)) ) && ( CumExecQty == input.CumExecQty || (CumExecQty != null && CumExecQty.Equals(input.CumExecQty)) ) && ( CumExecValue == input.CumExecValue || (CumExecValue != null && CumExecValue.Equals(input.CumExecValue)) ) && ( CumExecFee == input.CumExecFee || (CumExecFee != null && CumExecFee.Equals(input.CumExecFee)) ) && ( RejectReason == input.RejectReason || (RejectReason != null && RejectReason.Equals(input.RejectReason)) ) && ( OrderLinkId == input.OrderLinkId || (OrderLinkId != null && OrderLinkId.Equals(input.OrderLinkId)) ) && ( CreatedAt == input.CreatedAt || (CreatedAt != null && CreatedAt.Equals(input.CreatedAt)) ) && ( UpdatedAt == input.UpdatedAt || (UpdatedAt != null && UpdatedAt.Equals(input.UpdatedAt)) )); }