This class will be used to keep object refs so DLL calls are made to the correct object
Esempio n. 1
0
 public static DLLObjectWrapper getInstance()
 {
     lock (syncLock)
     {
         if (dllObjectWrapper == null)
         {
             dllObjectWrapper = new DLLObjectWrapper();
         }
     }
     return(dllObjectWrapper);
 }
Esempio n. 2
0
 public static DLLObjectWrapper getInstance()
 {
     lock (syncLock)
     {
         if (dllObjectWrapper == null)
         {
             dllObjectWrapper = new DLLObjectWrapper();
         }
     }
     return dllObjectWrapper;
 }
Esempio n. 3
0
 static void OnInitThread(Int64 index, int hChartWnd, Type type)
 {
     DLLObjectWrapper.getInstance().initMQLExpert(index, hChartWnd, type);
     try
     {
         getInstance(index).OnInit();
     }
     finally
     {
         getInstance(index).executingOnInit = false;
     }
 }
Esempio n. 4
0
        public static void ExecOnInit(Int64 ix, int hChartWnd, Type type)
        {
            LOG.Debug(String.Format("Initializing: {0}", type.ToString()));
            DLLObjectWrapper.getInstance().initMQLThreadPool(ix);

            try
            {
                getThreadPool(ix).QueueWorkItem(OnInitThread, ix, hChartWnd, type);
            }
            catch (ArgumentNullException)
            {
                LOG.Error(String.Format("Strategy Class {0} not found", type.ToString()));
            }
            catch (Exception e)
            {
                LOG.Error(e);
            }
        }
Esempio n. 5
0
 public static MQLCommandManager getInstance(Int64 ix)
 {
     return(DLLObjectWrapper.getInstance().getMQLCommandManager(ix));
 }
Esempio n. 6
0
 public static MQLExpert getInstance(Int64 ix)
 {
     return(DLLObjectWrapper.getInstance().getMQLExpert(ix));
 }
Esempio n. 7
0
 private static SmartThreadPool getThreadPool(Int64 ix)
 {
     return(DLLObjectWrapper.getInstance().getMQLThreadPool(ix));
 }