void _import_OnRspQryInstrument(InstrumentField pInstrument, bool pLast) { InstrumentField f = DicInstrumentField.GetOrAdd(pInstrument.InstrumentID, new InstrumentField()); foreach (var info in f.GetType().GetFields()) { info.SetValue(f, info.GetValue(pInstrument)); } }
void _import_OnRspQryInstrument(InstrumentField pInstrument, bool pLast) { InstrumentField f = DicInstrumentField.GetOrAdd(pInstrument.InstrumentID, new InstrumentField()); foreach (var info in pInstrument.GetType().GetFields()) { f.GetType().GetField(info.Name).SetValue(f, info.GetValue(pInstrument)); } }