Beispiel #1
0
        public void CreateIncrementRestorePoint()
        {
            RestorePoint newRestorePoint = Algorithm.CreateIncrementRestorePoint(Files, RestorePoints.Last());

            RestorePoints.Add(newRestorePoint);
            _currentSize += newRestorePoint.PointSize;
            AdaptToLimits();
        }
Beispiel #2
0
        public void CreateFullRestorePoint()
        {
            RestorePoint newRestorePoint = Algorithm.CreateFullRestorePoint(Files);

            RestorePoints.Add(newRestorePoint);
            _currentSize += newRestorePoint.PointSize;
            AdaptToLimits();
        }
        public RestorePoint CreateIncrementRestorePoint(List <FileInfo> files, RestorePoint previousPoint)
        {
            foreach (var file in files)
            {
                foreach (var previousPointFile in previousPoint.Files)
                {
                    if (file.FullName == previousPointFile.FullName &&
                        file.Length != previousPointFile.Length)
                    {
                        Files.Add(file);
                        files.Remove(file);
                        break;
                    }
                }
            }
            Files.AddRange(files);

            return(new RestorePoint(Files, false));
        }