Exemplo n.º 1
0
 public void TestQueryContractBank()
 {
     _api.OnRspQryContractBank += new TradeApi.RspQryContractBank((ref CThostFtdcContractBankField pContractBank,
                                                                   ref CThostFtdcRspInfoField pRspInfo, int nRequestID, byte bIsLast) =>
     {
         if (pRspInfo.ErrorID == 0)
         {
             Console.WriteLine("签约银行查询成功, BankID: {0}", pContractBank.BankID);
         }
         else
         {
             Console.WriteLine(pRspInfo.ErrorMsg);
         }
         Assert.IsTrue(pRspInfo.ErrorID == 0);
     });
     _api.QueryContractBank(1);
     Thread.Sleep(200);
 }