Exemple #1
0
 internal DataFeedProxy(string symbol)
 {
     if (null == symbol)
     {
         throw new ArgumentNullException("symbol");
     }
     m_symbol = symbol;
     m_impl   = DataFeedImpl.Create();
     m_impl.Subscribe(symbol);
 }
Exemple #2
0
        internal static void UpdateConnectionSettings(FixConnectionStringBuilder builder)
        {
            DataFeedImpl dataFeedImpl = Create();

            lock (s_synchronizer)
            {
                dataFeedImpl.Intialize(builder.ToString());
                string path = ConfirugationPath;
                TrySaveFixConnectionStringBuilder(path, builder);
            }
        }
Exemple #3
0
        public void Dispose()
        {
            DataFeedImpl impl = m_impl;

            m_impl = null;
            if (null != impl)
            {
                impl.Unsubscribe(m_symbol);
                impl.Dispose();
            }
        }
Exemple #4
0
 internal static DataFeedImpl Create()
 {
     lock (s_synchronizer)
     {
         if (null == s_impl)
         {
             s_impl = new DataFeedImpl();
             FixConnectionStringBuilder builder = LoadConnectionSettings();
             if (null != builder)
             {
                 string connectionString = builder.ToString();
                 s_impl.Intialize(connectionString);
             }
         }
         s_counter++;
         return(s_impl);
     }
 }