Exemple #1
0
        internal MarketProcessor(string id, Market market, StrategyLoadPatern strategy)
        {
            this.id = id;
            this.market = market;
            this.strategy = strategy;

            raceCourseAbreviations = new RaceCourseAbreviations();
            run = false;

            asyncResponsesWaiting = new Dictionary<string, DateTime>();
        }
Exemple #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);
        }