コード例 #1
0
        private FixProxyServer()
        {
            quoteRequest = new QuoteRequest();
            FileStoreFactory      mesStoreFact;
            DefaultMessageFactory mesFact;

            SessionSettings sets;

            try
            {
                sets = new SessionSettings(string.Format("{0}\\{1}",
                                                         ExecutablePath.ExecPath,
                                                         SessionSettingsParser.SessionSettingsFileName));
                SessionSettingsParser.Init(string.Format("{0}\\{1}",
                                                         ExecutablePath.ExecPath,
                                                         SessionSettingsParser.SessionSettingsFileName));
                app = new FixApplication();
                app.processMessageFromBroker += MessageDispatcher.ProcessMessageFromBroker;
                mesStoreFact = new FileStoreFactory(string.Format("{0}\\log",
                                                                  ExecutablePath.ExecPath));
                mesFact = new DefaultMessageFactory();

                app.OnSessionLogon += AppOnSessionLogon;
            }
            catch (Exception ex)
            {
                Logger.Error("SocketInitiator pre-create error", ex);
                throw;
            }

            try
            {
                initiator = new SocketInitiator(app, mesStoreFact, sets, mesFact);
            }
            catch (Exception ex)
            {
                Logger.Error("SocketInitiator create error", ex);
                throw;
            }
        }
コード例 #2
0
 public static void Init(string fileName)
 {
     instance = new SessionSettingsParser(fileName);
 }