/// <summary> /// Returns true if AccountStateResponse instances are equal /// </summary> /// <param name="other">Instance of AccountStateResponse to be compared</param> /// <returns>Boolean</returns> public bool Equals(AccountStateResponse other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Balance == other.Balance || Balance != null && Balance.Equals(other.Balance) ) && ( UnrealizedPl == other.UnrealizedPl || UnrealizedPl != null && UnrealizedPl.Equals(other.UnrealizedPl) ) && ( Equity == other.Equity || Equity != null && Equity.Equals(other.Equity) ) && ( AmData == other.AmData || AmData != null && AmData.SequenceEqual(other.AmData) )); }
/// <summary> /// Returns true if CurrencyPortfolio instances are equal /// </summary> /// <param name="other">Instance of CurrencyPortfolio to be compared</param> /// <returns>Boolean</returns> public bool Equals(CurrencyPortfolio other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( MaintenanceMargin == other.MaintenanceMargin || MaintenanceMargin != null && MaintenanceMargin.Equals(other.MaintenanceMargin) ) && ( AvailableWithdrawalFunds == other.AvailableWithdrawalFunds || AvailableWithdrawalFunds != null && AvailableWithdrawalFunds.Equals(other.AvailableWithdrawalFunds) ) && ( InitialMargin == other.InitialMargin || InitialMargin != null && InitialMargin.Equals(other.InitialMargin) ) && ( AvailableFunds == other.AvailableFunds || AvailableFunds != null && AvailableFunds.Equals(other.AvailableFunds) ) && ( Currency == other.Currency || Currency.Equals(other.Currency) ) && ( MarginBalance == other.MarginBalance || MarginBalance != null && MarginBalance.Equals(other.MarginBalance) ) && ( Equity == other.Equity || Equity != null && Equity.Equals(other.Equity) ) && ( Balance == other.Balance || Balance != null && Balance.Equals(other.Balance) )); }