示例#1
0
        /// <summary>
        /// 预启动。
        /// </summary>
        /// <param name="orderDriver"></param>
        /// <param name="quoteDriver"></param>
        public void PreStart(USeOrderDriver orderDriver, USeQuoteDriver quoteDriver)
        {
            if (orderDriver.DriverState != USeOrderDriverState.Ready)
            {
                throw new Exception("交易服务未登录");
            }

            if (quoteDriver.DriverState != USeQuoteDriverState.Ready)
            {
                throw new Exception("行情服务未登录");
            }
            m_loginUser = new InvestorAccount(orderDriver.BrokerId, orderDriver.Account, orderDriver.Password);

            m_orderDriver = orderDriver;
            m_quoteDriver = quoteDriver;

            m_orderDriver.SetAppLogger(m_eventLogger);
        }