public static void Add(LocalRepository repo, SynchronizerUnit unit) { synchronizerUnits.Add(repo, unit); }
public void InitializeSynchronizers(LocalRepository repo, bool recovery) { SQLiteRepositoryDAO repoDAO = new SQLiteRepositoryDAO(); Thread startSync; startSync = new Thread(delegate() { try { Logger.LogInfo("INFO INITIALIZE SYNC", "Initializing Synchronizers!"); SynchronizerUnit unit = SynchronizerUnit.GetByRepo(repo); if (unit == null) { unit = new SynchronizerUnit(repo); SynchronizerUnit.Add(repo, unit); } unit.InitializeSynchronizers(recovery); Logger.LogInfo("INFO INITIALIZE SYNC", "Synchronizers Ready!"); ErrorType = ERROR_TYPE.NULL; OnIdle(); } catch (Exception e) { Logger.LogInfo("ERROR ON INITIALIZATION SYNC", e); } }); startSync.Start(); }