示例#1
0
        public USeMarketData Clone()
        {
            USeMarketData clone = new USeMarketData();

            clone.Instrument         = Instrument.Clone();
            clone.AskPrice           = AskPrice;
            clone.AskSize            = AskSize;
            clone.BidPrice           = BidPrice;
            clone.BidSize            = BidSize;
            clone.OpenPrice          = OpenPrice;
            clone.HighPrice          = HighPrice;
            clone.LowPrice           = LowPrice;
            clone.LastPrice          = LastPrice;
            clone.ClosePrice         = ClosePrice;
            clone.PreClosePrice      = PreClosePrice;
            clone.UpperLimitPrice    = UpperLimitPrice;
            clone.LowerLimitPrice    = LowerLimitPrice;
            clone.PreSettlementPrice = PreSettlementPrice;
            clone.SettlementPrice    = this.SettlementPrice;
            clone.OpenInterest       = this.OpenInterest;
            clone.Volume             = Volume;
            clone.Turnover           = Turnover;
            clone.UpdateTime         = UpdateTime;
            clone.QuoteDay           = this.QuoteDay;
            clone.QuoteTime          = this.QuoteTime;
            clone.AvgPrice           = this.AvgPrice;
            clone.SpeculateRadio     = this.SpeculateRadio;
            return(clone);
        }
示例#2
0
 /// <summary>
 /// 触发行情变更事件。
 /// </summary>
 /// <param name="marketData">行情数据。</param>
 protected virtual void FireOnMarketDataChanged(USeMarketData marketData)
 {
     try
     {
         EventHandler <USeMarketDataChangedEventArgs> handel = this.OnMarketDataChanged;
         if (handel != null)
         {
             USeMarketDataChangedEventArgs args = new USeMarketDataChangedEventArgs(marketData);
             handel(this, args);
         }
     }
     catch (Exception ex)
     {
         Debug.Assert(false, ex.Message);
     }
 }
 /// <summary>
 /// 构造USeMarketDataChangedEventArgs实例。
 /// </summary>
 /// <param name="future">期货行情信息。</param>
 public USeMarketDataChangedEventArgs(USeMarketData future)
 {
     this.MarketData = future;
 }