public SyncData MakeSyncData(FolderSet folderSet) { foreach (var folderPair in folderSet.FolderList) { _addDictionary = FindNewFiles(folderPair, _addDictionary); _updateDictionary = FindUpdateFiles(folderPair, _updateDictionary); _deleteDictionary = FindDeleteFiles(folderPair, _deleteDictionary); } _updateDictionary = RemoveCollision(_deleteDictionary, _updateDictionary); return(new SyncData(_addDictionary, _updateDictionary, _deleteDictionary)); }
public SyncData MakeSyncData(FolderSet folderSet) { foreach (var folderPair in folderSet.FolderList) { _addDictionary = FindNewFiles(folderPair, _addDictionary); _updateDictionary = FindUpdateFiles(folderPair, _updateDictionary); _deleteDictionary = FindDeleteFiles(folderPair, _deleteDictionary); } var syncData = new SyncData(_addDictionary, _updateDictionary, new Dictionary <string, string>()); return(syncData); }
public SyncData Load(FolderSet folderSet) { if (folderSet.NoDeleteFlag) { SyncReaderStrategy = new SyncDataReaderDeleteStrategy(); } else { SyncReaderStrategy = new SyncDataReaderNoDeleteStrategy(); } var syncData = SyncReaderStrategy.MakeSyncData(folderSet); return(syncData); }