public static FileInformation ToFileInformation(this IndexedFile file, string relativeFilename, IPhotoDirectory photoDirectory)
        {
            var fileLocation = file.GetFileByFilename(relativeFilename);

            if (fileLocation == null)
            {
                throw new ArgumentException($"The indexed file is not located at {relativeFilename}");
            }

            return(photoDirectory.ToFileInformation(file, fileLocation));
        }
 public static IEnumerable <IFileInfo> ToFileInfos(this IndexedFile file, IPhotoDirectory photoDirectory)
 {
     return(file.Files.Select(x => photoDirectory.ToFileInformation(file, x)));
 }
 public static FileInformation ToFileInformation(this IndexedFile file, IPhotoDirectory photoDirectory)
 {
     return(photoDirectory.ToFileInformation(file, file.Files.First()));
 }