private void XApi_OnRspQryInstrument(object sender, ref XAPI.InstrumentField instrument, int size1, bool bIsLast) { if (onReturnInstrument == null) { return; } //TODO 这里连续查询两次会有问题,暂不处理 instruments.Add(StructTransfer.TransferInstrumentInfo(instrument)); if (bIsLast)// || instruments.Count == size1) { onReturnInstrument(sender, ref instruments); instruments.Clear(); } }
private void OnRspQryInstrument(object sender, ref InstrumentField instrument, int size1, bool bIsLast) { if (size1 > 0) { InstrumentInfoList.Add(new InstrumentInfo() { Symbol = instrument.Symbol, Instrument = instrument.InstrumentID, Exchange = instrument.ExchangeID, ProductID = instrument.ProductID, TickSize = instrument.PriceTick, Factor = instrument.VolumeMultiple }); } this.bIsLast = bIsLast; }
static void OnRspQryInstrument(object sender, ref InstrumentField instrument, int size1, bool bIsLast) { Console.WriteLine(instrument.InstrumentName); }
static void OnRspQryInstrument(object sender, ref InstrumentField instrument,int size1, bool bIsLast) { Console.WriteLine(instrument.InstrumentName); }
public static string InstrumentName([In] this InstrumentField field) { return(PInvokeUtility.GetUnicodeString(field.InstrumentName)); }