コード例 #1
0
 /// <summary>
 /// At the core of this project is the idea of seperating the strategy functions
 /// and Betfair data load etc so that we can (as a community of developers) build
 /// the underlying framework but not necasarily expose our strategies.
 /// This bit of code loads and initializes the guts of what we do.
 /// </summary>
 private void LoadPlugin()
 {
     try
     {
         if (!string.IsNullOrEmpty(strategy.CustomLibrary))
         {
             plugin = new Plugin.PluginManager(Directory.GetCurrentDirectory() + "\\" + strategy.CustomLibrary, strategy.CustomLibraryConfigSection);
         }
     }
     catch
     {
         SendErrorMessage(
             "External strategy assembly reference does not exist and will NOT be loaded! Attempted to retrieve from " +
             plugin.Settings.dllLocation);
     }
 }
コード例 #2
0
        internal void Stop()
        {
            requestTime = dateTimeCalculations.GetGmtTime();
            // Close the thread down
            SendMessage(String.Format("Thread {0} closing", id));
            run = false;

            ExecuteLoadedCustomStrategyLibrary(dateTimeCalculations.GetGmtTime(), Plugin.PluginManager.PluginBaseMethods.ShutDown);

            Core.TimerTick                  -= OnTimedEvent;
            Core.SystemShutdown             -= OnCloseAllEvent;
            Core.BroadcastMarketThreadState -= OnBroadcastThreadState;


            raceCourseAbreviations = null;
            plugin = null;
            SetStatus(MarketProcessorThreadStatus.CLOSED);
        }
コード例 #3
0
ファイル: Controller.cs プロジェクト: rgiot/phactory
        public void Init()
        {
            log = new Log(App.Controller.Config.ApplicationPath + "Log.txt");
            log.Init();

            config = Helper.ClassSerializer.Read <Config>(config.ConfigPath);

            UserConfig userConfig = Helper.ClassSerializer.Read <UserConfig>(config.UserConfigPath);

            if (userConfig != null)
            {
                App.Controller.UserConfig = userConfig;
            }

            pluginManager = new Plugin.PluginManager();
            pluginManager.Init();

            App.Controller.View.UpdateMostRecentUsed();
        }
コード例 #4
0
ファイル: MarketProcessor.cs プロジェクト: qkostal/program
 /// <summary>
 /// At the core of this project is the idea of seperating the strategy functions
 /// and Betfair data load etc so that we can (as a community of developers) build
 /// the underlying framework but not necasarily expose our strategies.
 /// This bit of code loads and initializes the guts of what we do.
 /// </summary>
 private void LoadPlugin()
 {
     try
     {
         if(!string.IsNullOrEmpty(strategy.CustomLibrary))
             plugin = new Plugin.PluginManager(Directory.GetCurrentDirectory() + "\\" + strategy.CustomLibrary, strategy.CustomLibraryConfigSection);
     }
     catch
     {
         SendErrorMessage(
             "External strategy assembly reference does not exist and will NOT be loaded! Attempted to retrieve from " +
             plugin.Settings.dllLocation);
     }
 }
コード例 #5
0
ファイル: MarketProcessor.cs プロジェクト: qkostal/program
        internal void Stop()
        {
            requestTime = dateTimeCalculations.GetGmtTime();
            // Close the thread down
            SendMessage(String.Format("Thread {0} closing", id));
            run = false;

            ExecuteLoadedCustomStrategyLibrary(dateTimeCalculations.GetGmtTime(), Plugin.PluginManager.PluginBaseMethods.ShutDown);

            Core.TimerTick -= OnTimedEvent;
            Core.SystemShutdown -= OnCloseAllEvent;
            Core.BroadcastMarketThreadState -= OnBroadcastThreadState;

            raceCourseAbreviations = null;
            plugin = null;
            SetStatus(MarketProcessorThreadStatus.CLOSED);
        }
コード例 #6
0
ファイル: Controller.cs プロジェクト: rgiot/phactory
        public void Init()
        {
            log = new Log(App.Controller.Config.ApplicationPath + "Log.txt");
            log.Init();

            config = Helper.ClassSerializer.Read<Config>(config.ConfigPath);

            UserConfig userConfig = Helper.ClassSerializer.Read<UserConfig>(config.UserConfigPath);
            if (userConfig != null)
            {
                App.Controller.UserConfig = userConfig;
            }

            pluginManager = new Plugin.PluginManager();
            pluginManager.Init();

            App.Controller.View.UpdateMostRecentUsed();
        }