public void MergeFrom(PositionMessage other) { if (other == null) { return; } if (other.Side != 0) { Side = other.Side; } if (other.Price != 0D) { Price = other.Price; } if (other.Size != 0D) { Size = other.Size; } if (other.openedAt_ != null) { if (openedAt_ == null) { OpenedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } OpenedAt.MergeFrom(other.OpenedAt); } fees_.Add(other.fees_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (openedAt_ != null) { hash ^= OpenedAt.GetHashCode(); } if (OpenPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OpenPrice); } if (HighPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(HighPrice); } if (LowPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LowPrice); } if (ClosePrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ClosePrice); } if (Volume != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Volume); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Side != 0) { hash ^= Side.GetHashCode(); } if (Price != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Price); } if (Size != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Size); } if (openedAt_ != null) { hash ^= OpenedAt.GetHashCode(); } hash ^= fees_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CashDrawerShift other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((State == null && other.State == null) || (State?.Equals(other.State) == true)) && ((OpenedAt == null && other.OpenedAt == null) || (OpenedAt?.Equals(other.OpenedAt) == true)) && ((EndedAt == null && other.EndedAt == null) || (EndedAt?.Equals(other.EndedAt) == true)) && ((ClosedAt == null && other.ClosedAt == null) || (ClosedAt?.Equals(other.ClosedAt) == true)) && ((EmployeeIds == null && other.EmployeeIds == null) || (EmployeeIds?.Equals(other.EmployeeIds) == true)) && ((OpeningEmployeeId == null && other.OpeningEmployeeId == null) || (OpeningEmployeeId?.Equals(other.OpeningEmployeeId) == true)) && ((EndingEmployeeId == null && other.EndingEmployeeId == null) || (EndingEmployeeId?.Equals(other.EndingEmployeeId) == true)) && ((ClosingEmployeeId == null && other.ClosingEmployeeId == null) || (ClosingEmployeeId?.Equals(other.ClosingEmployeeId) == true)) && ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) && ((OpenedCashMoney == null && other.OpenedCashMoney == null) || (OpenedCashMoney?.Equals(other.OpenedCashMoney) == true)) && ((CashPaymentMoney == null && other.CashPaymentMoney == null) || (CashPaymentMoney?.Equals(other.CashPaymentMoney) == true)) && ((CashRefundsMoney == null && other.CashRefundsMoney == null) || (CashRefundsMoney?.Equals(other.CashRefundsMoney) == true)) && ((CashPaidInMoney == null && other.CashPaidInMoney == null) || (CashPaidInMoney?.Equals(other.CashPaidInMoney) == true)) && ((CashPaidOutMoney == null && other.CashPaidOutMoney == null) || (CashPaidOutMoney?.Equals(other.CashPaidOutMoney) == true)) && ((ExpectedCashMoney == null && other.ExpectedCashMoney == null) || (ExpectedCashMoney?.Equals(other.ExpectedCashMoney) == true)) && ((ClosedCashMoney == null && other.ClosedCashMoney == null) || (ClosedCashMoney?.Equals(other.ClosedCashMoney) == true)) && ((Device == null && other.Device == null) || (Device?.Equals(other.Device) == true))); }
public void MergeFrom(PositionHistoryItemMessage other) { if (other == null) { return; } if (other.Side != 0) { Side = other.Side; } if (other.openedAt_ != null) { if (openedAt_ == null) { OpenedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } OpenedAt.MergeFrom(other.OpenedAt); } if (other.timeFrame_ != null) { if (timeFrame_ == null) { TimeFrame = new global::Google.Protobuf.WellKnownTypes.Duration(); } TimeFrame.MergeFrom(other.TimeFrame); } if (other.Volume != 0D) { Volume = other.Volume; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (Side != 0) { hash ^= Side.GetHashCode(); } if (openedAt_ != null) { hash ^= OpenedAt.GetHashCode(); } if (timeFrame_ != null) { hash ^= TimeFrame.GetHashCode(); } if (Volume != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Volume); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hashCode = -323366853; if (Id != null) { hashCode += Id.GetHashCode(); } if (State != null) { hashCode += State.GetHashCode(); } if (OpenedAt != null) { hashCode += OpenedAt.GetHashCode(); } if (EndedAt != null) { hashCode += EndedAt.GetHashCode(); } if (ClosedAt != null) { hashCode += ClosedAt.GetHashCode(); } if (Description != null) { hashCode += Description.GetHashCode(); } if (OpenedCashMoney != null) { hashCode += OpenedCashMoney.GetHashCode(); } if (ExpectedCashMoney != null) { hashCode += ExpectedCashMoney.GetHashCode(); } if (ClosedCashMoney != null) { hashCode += ClosedCashMoney.GetHashCode(); } return(hashCode); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CashDrawerShiftSummary other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((State == null && other.State == null) || (State?.Equals(other.State) == true)) && ((OpenedAt == null && other.OpenedAt == null) || (OpenedAt?.Equals(other.OpenedAt) == true)) && ((EndedAt == null && other.EndedAt == null) || (EndedAt?.Equals(other.EndedAt) == true)) && ((ClosedAt == null && other.ClosedAt == null) || (ClosedAt?.Equals(other.ClosedAt) == true)) && ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) && ((OpenedCashMoney == null && other.OpenedCashMoney == null) || (OpenedCashMoney?.Equals(other.OpenedCashMoney) == true)) && ((ExpectedCashMoney == null && other.ExpectedCashMoney == null) || (ExpectedCashMoney?.Equals(other.ExpectedCashMoney) == true)) && ((ClosedCashMoney == null && other.ClosedCashMoney == null) || (ClosedCashMoney?.Equals(other.ClosedCashMoney) == true))); }
public void MergeFrom(OhlcMessage other) { if (other == null) { return; } if (other.openedAt_ != null) { if (openedAt_ == null) { OpenedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } OpenedAt.MergeFrom(other.OpenedAt); } if (other.OpenPrice != 0D) { OpenPrice = other.OpenPrice; } if (other.HighPrice != 0D) { HighPrice = other.HighPrice; } if (other.LowPrice != 0D) { LowPrice = other.LowPrice; } if (other.ClosePrice != 0D) { ClosePrice = other.ClosePrice; } if (other.Volume != 0D) { Volume = other.Volume; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hashCode = -498109440; if (Id != null) { hashCode += Id.GetHashCode(); } if (State != null) { hashCode += State.GetHashCode(); } if (OpenedAt != null) { hashCode += OpenedAt.GetHashCode(); } if (EndedAt != null) { hashCode += EndedAt.GetHashCode(); } if (ClosedAt != null) { hashCode += ClosedAt.GetHashCode(); } if (EmployeeIds != null) { hashCode += EmployeeIds.GetHashCode(); } if (OpeningEmployeeId != null) { hashCode += OpeningEmployeeId.GetHashCode(); } if (EndingEmployeeId != null) { hashCode += EndingEmployeeId.GetHashCode(); } if (ClosingEmployeeId != null) { hashCode += ClosingEmployeeId.GetHashCode(); } if (Description != null) { hashCode += Description.GetHashCode(); } if (OpenedCashMoney != null) { hashCode += OpenedCashMoney.GetHashCode(); } if (CashPaymentMoney != null) { hashCode += CashPaymentMoney.GetHashCode(); } if (CashRefundsMoney != null) { hashCode += CashRefundsMoney.GetHashCode(); } if (CashPaidInMoney != null) { hashCode += CashPaidInMoney.GetHashCode(); } if (CashPaidOutMoney != null) { hashCode += CashPaidOutMoney.GetHashCode(); } if (ExpectedCashMoney != null) { hashCode += ExpectedCashMoney.GetHashCode(); } if (ClosedCashMoney != null) { hashCode += ClosedCashMoney.GetHashCode(); } if (Device != null) { hashCode += Device.GetHashCode(); } return(hashCode); }