/// <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); } }
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); }
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(); }
/// <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); } }
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(); }