public void TestQueryInvestor() { _api.OnRspQryInvestor += new TradeApi.RspQryInvestor((ref CThostFtdcInvestorField pInvestor, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, byte bIsLast) => { if (pRspInfo.ErrorID == 0) { Console.WriteLine("投资者查询成功, InvestorID: {0}", pInvestor.InvestorID); } else { Console.WriteLine(pRspInfo.ErrorMsg); } Assert.IsTrue(pRspInfo.ErrorID == 0); }); _api.QueryInvestor(1); Thread.Sleep(200); }