我有一个文本文件FIX messages
(包含所有文件和MarketDataIncrementalRefresh(类型X)),我想找到一种使用QuickFIX
inC#
创建MarketDataIncrementalRefresh
消息的方法strings
。
有什么建议么?
这是一条线的示例:
1128 = 9 9 = 263 35 = X 49 = CME 34 = 10568699 52 = 20110110205433535 75 = 20110110 268 = 2 279 = 1 22 = 8 48 = 812201 83 = 1243518 107 = GEZ2 269 = 1 270 = 9825.0 271 = 153 273 = 205433000 336 = 2 346 = 14 1023 = 1 279 = 122 = 8 48 = 812201 83 = 1243519 107 = GEZ2 269 = 1270 = 9826.0 271 = 453 273 = 205433000 336 = 2 346 = 21 1023 = 3 10 = 058
基本上,这是如何完成的:
string line = sr.ReadLine();
QuickFix42.MessageFactory fac = new QuickFix42.MessageFactory();
QuickFix.MsgType msgType = QuickFix.Message.identifyType(line);
QuickFix.Message message = fac.create("", msgType.getObject() as string);
message.setString(line, false);
工厂一旦给定给定的消息类型,就创建正确的消息类型,因此在这种情况下,由于类型为{X},因此QuickFix.Message消息是指向MarketDataIncrementalRefresh的指针,然后message.setString设置给定字符串中的其余道具。