Пример #1
0
 public static MQLCommandManager getInstance()
 {
     if (commandManager == null)
     {
         commandManager = new MQLCommandManager();
     }
     return commandManager;
 }
Пример #2
0
        private DLLObjectWrapper()
        {
            mqlExperts         = new Dictionary <Int64, MQLExpert>();
            mqlCommandManagers = new Dictionary <Int64, MQLCommandManager>();
            mqlThreadPools     = new Dictionary <Int64, MQLThreadPool>();
            mqlExpertsLock     = new object();
            restServer         = new RESTServer();
            restServer.Start();

            // create the default command manager for REST
            // Only need to use chart specific one for ChartObjects
            mqlCommandManagers[DEFAULT_CHART_ID] = new MQLCommandManager(DEFAULT_CHART_ID, 0);
        }
Пример #3
0
        private DLLObjectWrapper()
        {
            restCommandLock = 0;
            mqlExperts = new Dictionary<Int64, MQLExpert>();
            mqlCommandManagers = new Dictionary<Int64, MQLCommandManager>();
            mqlThreadPools = new Dictionary<Int64, MQLThreadPool>();
            mqlExpertsLock = new object();
            restServer = new RESTServer();
            restServer.Start();

            // create the default command manager for REST
            // Only need to use chart specific one for ChartObjects
            mqlCommandManagers[DEFAULT_CHART_ID] = new MQLCommandManager(DEFAULT_CHART_ID);
        }
Пример #4
0
 public void initMQLExpert(Int64 ix, int hChartWnd, Type type)
 {
     lock (mqlExpertsLock)
     {
         try
         {
             mqlCommandManagers[ix] = new MQLCommandManager(ix, hChartWnd);
             mqlExperts[ix]         = (MQLExpert)Activator.CreateInstance(type, ix);
         }
         catch (Exception e)
         {
             LOG.Error(e);
         }
     }
 }
Пример #5
0
 public void initMQLExpert(Int64 ix, Type type)
 {
     lock (mqlExpertsLock)
     {
         try
         {
             mqlCommandManagers[ix] = new MQLCommandManager(ix);
             mqlExperts[ix] = (MQLExpert)Activator.CreateInstance(type, ix);
         }
         catch (Exception e)
         {
             LOG.Error(e);
         }
     }
 }