//public bool ReadFrom(string cfgFileName) //{ // if (!UserSession.AuthFile.ReadFrom(cfgFileName)) return false; // return true; //} public async Task StartCheckingLoop(string cfgFilename) { //_fileName = cfgFilename; if (!_cfgFile.ReadFrom(cfgFilename)) { return; } UserSession.SetClient(_d7Client); _synchronizer.SetClient(_d7Client); _remotes.SetClient(_d7Client, _cfgFile); _d7Client.LowRetryIntervalSeconds = -1; IsCheckingLooped = true; while (IsCheckingLooped) { try { await UpdateNowCmd.ExecuteAsync(null); } catch (Exception ex) { LogError("await UpdateNowCmd.ExecuteAsync", ex); } try { await DelayRetry(_cfgFile.IntervalMins); } catch (Exception ex) { LogError("await DelayRetry", ex); } } }
public FilesTabVM2(IRepository <SyncableFileRemote> filesRepo, AppFileGrouper fileGrouper, IFileSynchronizer fileSynchronizer, ID7Client d7Client, BinUploaderCfgFile cfgFile) { _grouper = ForwardLogs(fileGrouper); _synchronizer = ForwardLogs(fileSynchronizer); _remotes = ForwardLogs(filesRepo); //_cfgFile = ForwardLogs(cfgFile); //_d7Client = ForwardLogs(d7Client); MainList = new VmList <RemoteVsLocalFile>(); UploadChangesCmd = AsyncCommand.Create(token => UploadChanges(token)); _remotes.SetClient(d7Client, cfgFile); _synchronizer.SetClient(d7Client); SetEventHandlers(); }
public FilesTabVM2(IRepository<SyncableFileRemote> filesRepo, AppFileGrouper fileGrouper, IFileSynchronizer fileSynchronizer, ID7Client d7Client, BinUploaderCfgFile cfgFile) { _grouper = ForwardLogs(fileGrouper); _synchronizer = ForwardLogs(fileSynchronizer); _remotes = ForwardLogs(filesRepo); //_cfgFile = ForwardLogs(cfgFile); //_d7Client = ForwardLogs(d7Client); MainList = new VmList<RemoteVsLocalFile>(); UploadChangesCmd = AsyncCommand.Create(token => UploadChanges(token)); _remotes.SetClient(d7Client, cfgFile); _synchronizer.SetClient(d7Client); SetEventHandlers(); }