Example #1
0
        /// <summary>
        ///     Returns list sorted in chronological order
        /// </summary>
        private List <BackupFileFolderInfo> GetBackupFolders()
        {
            var subfolders = DatabaseBackupDirectory.GetDirectories();

            var result = new List <BackupFileFolderInfo>(subfolders.Length);

            foreach (var directoryInfo in subfolders)
            {
                var folderInfo = NamingConvention.GetFolderInfo(directoryInfo);
                if (folderInfo != null)
                {
                    result.Add(folderInfo);
                }
            }

            result = result.OrderBy(f => f.StartTime).ToList();

            InferEndTimeWhereNotDefinedExplicitly(result);

            return(result);
        }