/// <summary> /// Returns true if Position instances are equal /// </summary> /// <param name="other">Instance of Position to be compared</param> /// <returns>Boolean</returns> public bool Equals(Position other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Instrument == other.Instrument || Instrument != null && Instrument.Equals(other.Instrument) ) && ( Qty == other.Qty || Qty != null && Qty.Equals(other.Qty) ) && ( Side == other.Side || Side != null && Side.Equals(other.Side) ) && ( AvgPrice == other.AvgPrice || AvgPrice != null && AvgPrice.Equals(other.AvgPrice) ) && ( UnrealizedPl == other.UnrealizedPl || UnrealizedPl != null && UnrealizedPl.Equals(other.UnrealizedPl) )); }
/// <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 (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Instrument == other.Instrument || Instrument != null && Instrument.Equals(other.Instrument) ) && ( Qty == other.Qty || Qty != null && Qty.Equals(other.Qty) ) && ( Side == other.Side || Side != null && Side.Equals(other.Side) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( FilledQty == other.FilledQty || FilledQty != null && FilledQty.Equals(other.FilledQty) ) && ( AvgPrice == other.AvgPrice || AvgPrice != null && AvgPrice.Equals(other.AvgPrice) ) && ( LimitPrice == other.LimitPrice || LimitPrice != null && LimitPrice.Equals(other.LimitPrice) ) && ( StopPrice == other.StopPrice || StopPrice != null && StopPrice.Equals(other.StopPrice) ) && ( ParentId == other.ParentId || ParentId != null && ParentId.Equals(other.ParentId) ) && ( ParentType == other.ParentType || ParentType != null && ParentType.Equals(other.ParentType) ) && ( Duration == other.Duration || Duration != null && Duration.Equals(other.Duration) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) )); }