Пример #1
0
 public Replicator(
     IPdgtmDbAdapter pdgtmDbAdapter,
     IHistorianAdapter historianAdapter)
 {
     _pdgtmDbAdapter   = pdgtmDbAdapter;
     _historianAdapter = historianAdapter;
 }
Пример #2
0
        public WellEmulator(
            IEmulator emulator,
            IReplicator replicator,
            IPdgtmDbAdapter pdgtmDbAdapter,
            IHistorianAdapter historianAdapter,
            ISettingsManager settingsManager,
            IDatabaseObserver databaseObserver)
        {
            _emulator         = emulator;
            _replicator       = replicator;
            _pdgtmDbAdapter   = pdgtmDbAdapter;
            _historianAdapter = historianAdapter;
            _settingsManager  = settingsManager;
            _databaseObserver = databaseObserver;

            _databaseObserver.OnHistorianDataChanged += OnHistorianDataChanged;
            _databaseObserver.OnPdgtmDataChanged     += OnPdgtmDataChanged;

            try
            {
                LoadSettings();
            }
            catch (LoadSettingsException ex)
            {
                _logger.Error("Error while loading settings", ex);
                throw;
            }

            _logger.Trace("Service object created");
        }