Re: [Quickfix-developers] Reading settings from stream
Brought to you by:
orenmnero
From: Fabio R. <FRe...@1e...> - 2009-10-09 13:29:41
|
Thank you very much. It worked. Fabio ________________________________________ Von: Alain Tésio [a....@ne...] Gesendet: Freitag, 9. Oktober 2009 15:21 An: Fabio Renggli; qui...@li... Betreff: RE: Reading settings from stream > I tried to create a FIX application by setting the settings with a > MemoryStream in c#. But there it doesn't work. the SessionSettings remains > empty. Can anyone help me out with a either a sample about using the > stream or the dictionary method? Hi, here is some code I have to initialize the settings using a dictionary. Alain sessionSettings = new SessionSettings(); QuickFix.Dictionary DefaultDic = sessionSettings.get(); string cn = settings.GetODBCConnectionString(); DefaultDic.setString("OdbcLogConnectionString", cn); DefaultDic.setString("OdbcStoreConnectionString", cn); DefaultDic.setString("OdbcDataBase", db); sessionSettings.set(DefaultDic); string beginString = "FIX." + source.FIXVersion; QuickFix.Dictionary dic = new QuickFix.Dictionary(); dic.setString("TargetCompID", source.TargetCompID); dic.setString("SenderCompID", source.SenderCompID); dic.setString("ConnectionType", "initiator"); dic.setString("BeginString", beginString); dic.setString("StartTime", source.StartTime); dic.setString("EndTime", source.EndTime); dic.setString("DataDictionary", source.DataDictionaryPath); dic.setString("SocketConnectPort", source.ConnectPort); dic.setString("SocketConnectHost", source.ConnectHost); dic.setString("HeartBtInt", source.HeartBtInt.ToString()); dic.setString("ReconnectInterval", source.ReconnectInterval.ToString()); dic.setString("PersistMessages", "Y"); dic.setBool("ResetOnDisconnect", false); dic.setBool("ResetOnLogon", source.ResetOnLogin); //false dic.setBool("ResetOnLogout", source.ResetOnLogout); //false dic.setString("sessionqualifier", "Nexfi"); SessionID sid = new SessionID( new BeginString(beginString), new SenderCompID(source.SenderCompID), new TargetCompID(source.TargetCompID), "Nexfi"); sessionSettings.set(sid, dic); |