Beispiel #1
0
 public InputOrder(
     string brokerID,
     string investorID,
     DirectionType direction,
     OffsetFlag offsetFlag,
     string instrumentID,
     double price,
     int volume,
     string groupID)
 {
     this.BrokerID     = brokerID;
     this.InvestorID   = investorID;
     this.Direction    = direction;
     this.OffsetFlag   = offsetFlag;
     this.InstrumentID = instrumentID;
     this.Price        = price;
     this.Volume       = volume;
     this.GroupID      = groupID;
 }
Beispiel #2
0
 public InputOrder(
     string brokerID,
     string investorID,
     DirectionType direction,
     OffsetFlag offsetFlag,
     string instrumentID,
     double price,
     int volume,
     string groupID)
 {
     this.BrokerID = brokerID;
     this.InvestorID = investorID;
     this.Direction = direction;
     this.OffsetFlag = offsetFlag;
     this.InstrumentID = instrumentID;
     this.Price = price;
     this.Volume = volume;
     this.GroupID = groupID;
 }
Beispiel #3
0
        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 (OrderRef.Length != 0)
            {
                hash ^= OrderRef.GetHashCode();
            }
            if (UserId.Length != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (TradeId.Length != 0)
            {
                hash ^= TradeId.GetHashCode();
            }
            if (Direction != 0)
            {
                hash ^= Direction.GetHashCode();
            }
            if (OffsetFlag != 0)
            {
                hash ^= OffsetFlag.GetHashCode();
            }
            if (HedgeFlag != 0)
            {
                hash ^= HedgeFlag.GetHashCode();
            }
            if (Price != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Price);
            }
            if (Volume != 0)
            {
                hash ^= Volume.GetHashCode();
            }
            if (TradeDate.Length != 0)
            {
                hash ^= TradeDate.GetHashCode();
            }
            if (TradeTime.Length != 0)
            {
                hash ^= TradeTime.GetHashCode();
            }
            if (OrderLocalId.Length != 0)
            {
                hash ^= OrderLocalId.GetHashCode();
            }
            if (TradingDay.Length != 0)
            {
                hash ^= TradingDay.GetHashCode();
            }
            if (BrokerOrderSeq != 0)
            {
                hash ^= BrokerOrderSeq.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }