private void TryStartNextBatch() { if (!_batches.MoveNext() || _cancelEmulation) { State = EmulationStates.Stopping; State = EmulationStates.Stopped; return; } _batch = _batches.Current.ToArray(); _currentBatch++; InitAdapters(_batch); EmulationConnector.Connect(); EmulationConnector.Start(EmulationSettings.StartTime, EmulationSettings.StopTime); }
private void TryStartNextBatch() { if (!_batches.MoveNext() || _cancelEmulation) { State = EmulationStates.Stopping; State = EmulationStates.Stopped; return; } _batch = _batches.Current.ToArray(); _currentBatch++; EmulationConnector.ClearCache(); InitAdapters(_batch); EmulationConnector.HistoryMessageAdapter.StartDate = EmulationSettings.StartTime; EmulationConnector.HistoryMessageAdapter.StopDate = EmulationSettings.StopTime; EmulationConnector.LookupSecuritiesResult += OnEmulationConnectorOnLookupSecuritiesResult; EmulationConnector.Connect(); }