Ejemplo n.º 1
0
 public PlanItem(Mask mask, string path, ISyncRule rule, string message)
 {
     Mask     = mask;
     FilePath = path;
     Rule     = rule;
     Message  = message;
 }
Ejemplo n.º 2
0
 public PlanItem(Mask mask, string path, ISyncRule rule, string message)
 {
     Mask = mask;
     FilePath = path;
     Rule = rule;
     Message = message;
 }
Ejemplo n.º 3
0
        public Synchronizer(Tager tager, ISyncRule rule)
        {
            _tager = tager;

            ModifiedFiles = new List <IMp3File>();
            ErrorFiles    = new Dictionary <string, string>();
            OperationList = new List <SyncOperation>();

            _syncRule = rule;
        }
Ejemplo n.º 4
0
        public Synchronizer(Tager tager, ISyncRule rule)
        {
            _tager = tager;

            ModifiedFiles = new List<IMp3File>();
            ErrorFiles = new Dictionary<string, string>();
            OperationList = new List<SyncOperation>();

            _syncRule = rule;
        }
Ejemplo n.º 5
0
        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");
            }
        }
Ejemplo n.º 6
0
        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");
        }