public virtual void Init() { try { //CimConfig : app.config 설정 CimConfig = ConfigurationManager.GetSection("cim") as CimConfig; //ITransfer : Mq 전송등 상위전송 Transfers = new ObservableCollection <ITransfer> { new MqTransfer() }; //Excel 어드레스맵 제공 AddressMapService = new ExcelAddressMapService(); //LoadAddressMaps, ControllerManagers (var result, _) = LoadAddressMapAndCreateManager(CimConfig.AddressMapFileName, Transfers); if (result == false) { return; //파싱 실패시 !!! } //t_dvc_info, t_var_info 동기화 서비스 var connectionStrings = ConfigurationManager.ConnectionStrings["pie"]; if (string.IsNullOrEmpty(connectionStrings.ConnectionString)) { logger.Error($"connectionString Fail!={connectionStrings.ConnectionString}"); return; } else { DbSyncService = new PieDbSyncService(connectionStrings.ProviderName, connectionStrings.ConnectionString); DbSyncService.Sync(controllers); //IDataInputService : 데이터수집을 REST로 제공 DataInputService = new DataInputService(); //Start Start(); } } catch (Exception ex) { logger.Error($"ex={ex}"); } }
public SchedulerService(IDbSyncService dbSyncService, DataSyncSettings dataSyncSettings) { this.dbSyncService = dbSyncService; syncSchedulerSettings = dataSyncSettings.SyncSchedulerSettings; }