public override int GetHashCode() { int hash = 1; if (OwnerAddress.Length != 0) { hash ^= OwnerAddress.GetHashCode(); } if (ExchangeId != 0L) { hash ^= ExchangeId.GetHashCode(); } if (TokenId.Length != 0) { hash ^= TokenId.GetHashCode(); } if (Quant != 0L) { hash ^= Quant.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (HedgeFlag != 0) { hash ^= HedgeFlag.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void ConsistentHashCode() { // ARRANGE var a = new ExchangeId(new DateTimeOffset(2000, 1, 1, 0, 0, 0, TimeSpan.Zero), new Guid("F7E38533-F06B-407C-B26D-DC8EE9E961D4")); var b = new ExchangeId(new DateTimeOffset(2000, 1, 1, 0, 0, 0, TimeSpan.Zero), new Guid("F7E38533-F06B-407C-B26D-DC8EE9E961D4")); // ACT, ASSERT a.GetHashCode().Should().Be(b.GetHashCode()); }
public override int GetHashCode() { unchecked { var hashCode = (Id != null ? Id.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ExchangeId != null ? ExchangeId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ExchangeApiKey != null ? ExchangeApiKey.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (ExchangeId != null ? ExchangeId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ PairsAsBaseCount; hashCode = (hashCode * 397) ^ PairsAsQuoteCount; return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (SymbolId != null ? SymbolId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ExchangeId != null ? ExchangeId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ExchangeSymbol != null ? ExchangeSymbol.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BaseAsset != null ? BaseAsset.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QuoteAsset != null ? QuoteAsset.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TradeTypeAsString != null ? TradeTypeAsString.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (OrderSysId.Length != 0) { hash ^= OrderSysId.GetHashCode(); } if (OrderRef.Length != 0) { hash ^= OrderRef.GetHashCode(); } if (FrontId != 0) { hash ^= FrontId.GetHashCode(); } if (SessionId != 0) { hash ^= SessionId.GetHashCode(); } if (ActionFlag != 0) { hash ^= ActionFlag.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { unchecked { var hashCode = (ExchangeId != null ? ExchangeId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BaseAsset != null ? BaseAsset.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QuoteAsset != null ? QuoteAsset.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TradeTypeAsString != null ? TradeTypeAsString.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TradeDirectionAsString != null ? TradeDirectionAsString.GetHashCode() : 0); hashCode = (hashCode * 397) ^ EventTime.GetHashCode(); hashCode = (hashCode * 397) ^ (ExchangeSequenceId != null ? ExchangeSequenceId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ Amount.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hash = 17; hash = hash * 29 + RequestId != null?RequestId.GetHashCode() : 0; hash = hash * 29 + Symbol.GetHashCode(); hash = hash * 29 + ExchangeId.GetHashCode(); hash = hash * 29 + SecurityType.GetHashCode(); hash = hash * 29 + (Last.HasValue ? Last.GetHashCode() : 0); hash = hash * 29 + (TradeSize.HasValue ? TradeSize.GetHashCode() : 0); hash = hash * 29 + (TradedMarket.HasValue ? TradedMarket.GetHashCode() : 0); hash = hash * 29 + (TradeDate.HasValue ? TradeDate.GetHashCode() : 0); hash = hash * 29 + (TradeTime.HasValue ? TradeTime.GetHashCode() : 0); hash = hash * 29 + (Open.HasValue ? Open.GetHashCode() : 0); hash = hash * 29 + (High.HasValue ? High.GetHashCode() : 0); hash = hash * 29 + (Low.HasValue ? Low.GetHashCode() : 0); hash = hash * 29 + (Close.HasValue ? Close.GetHashCode() : 0); hash = hash * 29 + (Bid.HasValue ? Bid.GetHashCode() : 0); hash = hash * 29 + (BidMarket.HasValue ? BidMarket.GetHashCode() : 0); hash = hash * 29 + (BidSize.HasValue ? BidSize.GetHashCode() : 0); hash = hash * 29 + (Ask.HasValue ? Ask.GetHashCode() : 0); hash = hash * 29 + (AskMarket.HasValue ? AskMarket.GetHashCode() : 0); hash = hash * 29 + (AskSize.HasValue ? AskSize.GetHashCode() : 0); hash = hash * 29 + (Volume.HasValue ? Volume.GetHashCode() : 0); hash = hash * 29 + (PDayVolume.HasValue ? PDayVolume.GetHashCode() : 0); hash = hash * 29 + (UpVolume.HasValue ? UpVolume.GetHashCode() : 0); hash = hash * 29 + (DownVolume.HasValue ? DownVolume.GetHashCode() : 0); hash = hash * 29 + (NeutralVolume.HasValue ? NeutralVolume.GetHashCode() : 0); hash = hash * 29 + (TradeCount.HasValue ? TradeCount.GetHashCode() : 0); hash = hash * 29 + (UpTrades.HasValue ? UpTrades.GetHashCode() : 0); hash = hash * 29 + (DownTrades.HasValue ? DownTrades.GetHashCode() : 0); hash = hash * 29 + (NeutralTrades.HasValue ? NeutralTrades.GetHashCode() : 0); hash = hash * 29 + (VWAP.HasValue ? VWAP.GetHashCode() : 0); hash = hash * 29 + (MutualDiv.HasValue ? MutualDiv.GetHashCode() : 0); hash = hash * 29 + (SevenDayYield.HasValue ? SevenDayYield.GetHashCode() : 0); hash = hash * 29 + (OpenInterest.HasValue ? OpenInterest.GetHashCode() : 0); hash = hash * 29 + (Settlement.HasValue ? Settlement.GetHashCode() : 0); hash = hash * 29 + (SettlementDate.HasValue ? SettlementDate.GetHashCode() : 0); hash = hash * 29 + (ExpirationDate.HasValue ? ExpirationDate.GetHashCode() : 0); hash = hash * 29 + (Strike.HasValue ? Strike.GetHashCode() : 0); return(hash); } }
public override int GetHashCode() { unchecked { var hashCode = ExchangeId != null?ExchangeId.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (TradeType != null ? TradeType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BaseAsset != null ? BaseAsset.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QuoteAsset != null ? QuoteAsset.GetHashCode() : 0); hashCode = (hashCode * 397) ^ TimePeriodStart.GetHashCode(); hashCode = (hashCode * 397) ^ TimePeriodEnd.GetHashCode(); hashCode = (hashCode * 397) ^ TimeOpen.GetHashCode(); hashCode = (hashCode * 397) ^ TimeClose.GetHashCode(); hashCode = (hashCode * 397) ^ PriceOpen.GetHashCode(); hashCode = (hashCode * 397) ^ PriceClose.GetHashCode(); hashCode = (hashCode * 397) ^ PriceLow.GetHashCode(); hashCode = (hashCode * 397) ^ PriceHigh.GetHashCode(); hashCode = (hashCode * 397) ^ VolumeTraded.GetHashCode(); hashCode = (hashCode * 397) ^ TradesCount.GetHashCode(); hashCode = (hashCode * 397) ^ (Id != null ? Id.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (OrderPriceType != 0) { hash ^= OrderPriceType.GetHashCode(); } if (Direction != 0) { hash ^= Direction.GetHashCode(); } if (CombOffsetFlag != 0) { hash ^= CombOffsetFlag.GetHashCode(); } if (CombHedgeFlag != 0) { hash ^= CombHedgeFlag.GetHashCode(); } if (LimitPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LimitPrice); } if (VolumeTotalOriginal != 0) { hash ^= VolumeTotalOriginal.GetHashCode(); } if (TimeCondition != 0) { hash ^= TimeCondition.GetHashCode(); } if (VolumeCondition != 0) { hash ^= VolumeCondition.GetHashCode(); } if (MinVolume != 0) { hash ^= MinVolume.GetHashCode(); } if (ContigentCondition != 0) { hash ^= ContigentCondition.GetHashCode(); } if (StopPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(StopPrice); } if (ForceCloseReason != 0) { hash ^= ForceCloseReason.GetHashCode(); } if (IsAutoSuspend != 0) { hash ^= IsAutoSuspend.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (InstrumentName.Length != 0) { hash ^= InstrumentName.GetHashCode(); } if (ProductId.Length != 0) { hash ^= ProductId.GetHashCode(); } if (ProductClass != 0) { hash ^= ProductClass.GetHashCode(); } if (DeliveryYear != 0) { hash ^= DeliveryYear.GetHashCode(); } if (DeliveryMonth != 0) { hash ^= DeliveryMonth.GetHashCode(); } if (MaxMarketOrderVolume != 0) { hash ^= MaxMarketOrderVolume.GetHashCode(); } if (MinMarketOrderVolume != 0) { hash ^= MinMarketOrderVolume.GetHashCode(); } if (MaxLimitOrderVolume != 0) { hash ^= MaxLimitOrderVolume.GetHashCode(); } if (MinLimitOrderVolume != 0) { hash ^= MinLimitOrderVolume.GetHashCode(); } if (VolumeMultiple != 0) { hash ^= VolumeMultiple.GetHashCode(); } if (PriceTick != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PriceTick); } if (CreateDate.Length != 0) { hash ^= CreateDate.GetHashCode(); } if (OpenDate.Length != 0) { hash ^= OpenDate.GetHashCode(); } if (ExpireDate.Length != 0) { hash ^= ExpireDate.GetHashCode(); } if (StartDelivDate.Length != 0) { hash ^= StartDelivDate.GetHashCode(); } if (EndDelivDate.Length != 0) { hash ^= EndDelivDate.GetHashCode(); } if (IsTrading != false) { hash ^= IsTrading.GetHashCode(); } if (UnderlyingMultiple != 0) { hash ^= UnderlyingMultiple.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (TradingDay.Length != 0) { hash ^= TradingDay.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (LastPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LastPrice); } if (PreSettlementPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PreSettlementPrice); } if (PreClosePrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PreClosePrice); } if (PreOpenInterest != 0) { hash ^= PreOpenInterest.GetHashCode(); } if (OpenPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OpenPrice); } if (HighestPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(HighestPrice); } if (LowestPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LowestPrice); } if (Volume != 0) { hash ^= Volume.GetHashCode(); } if (TurnOver != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(TurnOver); } if (OpenInterest != 0) { hash ^= OpenInterest.GetHashCode(); } if (ClosePrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ClosePrice); } if (SettlementPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SettlementPrice); } if (UpperLimitPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(UpperLimitPrice); } if (LowerLimitPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LowerLimitPrice); } if (UpdateTime.Length != 0) { hash ^= UpdateTime.GetHashCode(); } if (UpdateMillisec != 0) { hash ^= UpdateMillisec.GetHashCode(); } if (AveragePrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(AveragePrice); } if (ActionDay.Length != 0) { hash ^= ActionDay.GetHashCode(); } if (BidPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(BidPrice); } if (BidVolume != 0) { hash ^= BidVolume.GetHashCode(); } if (AskPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(AskPrice); } if (AskVolume != 0) { hash ^= AskVolume.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }