/// <summary> /// Returns true if Settlement instances are equal /// </summary> /// <param name="other">Instance of Settlement to be compared</param> /// <returns>Boolean</returns> public bool Equals(Settlement other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( SessionProfitLoss == other.SessionProfitLoss || SessionProfitLoss != null && SessionProfitLoss.Equals(other.SessionProfitLoss) ) && ( MarkPrice == other.MarkPrice || MarkPrice != null && MarkPrice.Equals(other.MarkPrice) ) && ( Funding == other.Funding || Funding != null && Funding.Equals(other.Funding) ) && ( Socialized == other.Socialized || Socialized != null && Socialized.Equals(other.Socialized) ) && ( SessionBankrupcy == other.SessionBankrupcy || SessionBankrupcy != null && SessionBankrupcy.Equals(other.SessionBankrupcy) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) ) && ( ProfitLoss == other.ProfitLoss || ProfitLoss != null && ProfitLoss.Equals(other.ProfitLoss) ) && ( Funded == other.Funded || Funded != null && Funded.Equals(other.Funded) ) && ( IndexPrice == other.IndexPrice || IndexPrice != null && IndexPrice.Equals(other.IndexPrice) ) && ( SessionTax == other.SessionTax || SessionTax != null && SessionTax.Equals(other.SessionTax) ) && ( SessionTaxRate == other.SessionTaxRate || SessionTaxRate != null && SessionTaxRate.Equals(other.SessionTaxRate) ) && ( InstrumentName == other.InstrumentName || InstrumentName != null && InstrumentName.Equals(other.InstrumentName) ) && ( Position == other.Position || Position != null && Position.Equals(other.Position) ) && ( Type == other.Type || Type.Equals(other.Type) )); }