Beispiel #1
0
 private void OnRspQryExchangeInstrument(IntPtr pTraderApi, ref DFITCExchangeInstrumentRtnField pInstrumentData, ref DFITCErrorRtnField pErrorInfo, bool bIsLast)
 {
     if (0 == pErrorInfo.nErrorID)
     {
         if (pInstrumentData.InstrumentID.Length > 0)
         {
             _dictInstruments[pInstrumentData.InstrumentID] = pInstrumentData;
             if (bIsLast)
             {
                 tdlog.Info("{0} {1}已经接收完成,当前总计{2}", pInstrumentData.ExchangeID, pInstrumentData.instrumentType, _dictInstruments.Count);
             }
         }
     }
     else
     {
         tdlog.Error("nRequestID:{0},ErrorID:{1},OnRspQryExchangeInstrument:{2}", pErrorInfo.requestID, pErrorInfo.nErrorID, pErrorInfo.errorMsg);
         EmitError(pErrorInfo.requestID, pErrorInfo.nErrorID, "OnRspQryExchangeInstrument:" + pErrorInfo.errorMsg);
     }
 }
 private static int SortDFITCExchangeInstrumentRtnField(DFITCExchangeInstrumentRtnField a1, DFITCExchangeInstrumentRtnField a2)
 {
     return(a1.InstrumentID.CompareTo(a2.InstrumentID));
 }