public PlanItem(Mask mask, string path, ISyncRule rule, string message) { Mask = mask; FilePath = path; Rule = rule; Message = message; }
public Synchronizer(Tager tager, ISyncRule rule) { _tager = tager; ModifiedFiles = new List <IMp3File>(); ErrorFiles = new Dictionary <string, string>(); OperationList = new List <SyncOperation>(); _syncRule = rule; }
public Synchronizer(Tager tager, ISyncRule rule) { _tager = tager; ModifiedFiles = new List<IMp3File>(); ErrorFiles = new Dictionary<string, string>(); OperationList = new List<SyncOperation>(); _syncRule = rule; }
public void Sync(IMp3File file, Mask mask, ISyncRule rule) { var errorFlag = true; _tager.CurrentFile = file; foreach (var operation in rule.OperationsList) { if (operation.Call(mask, _tager, file)) { OperationList.Add(operation); ModifiedFiles.Add(_tager.CurrentFile); errorFlag = false; break; } } if (errorFlag) { ErrorFiles.Add(_tager.CurrentFile.Name, "Can't sync this file"); } }
public void Sync(IMp3File file, Mask mask, ISyncRule rule) { var errorFlag = true; _tager.CurrentFile = file; foreach (var operation in rule.OperationsList) { if (operation.Call(mask, _tager, file)) { OperationList.Add(operation); ModifiedFiles.Add(_tager.CurrentFile); errorFlag = false; break; } } if (errorFlag) ErrorFiles.Add(_tager.CurrentFile.Name, "Can't sync this file"); }