예제 #1
0
        private static FileInfo GetJacketImage(JacketSize jacketSize, DirectoryInfo dir)
        {
            var size  = jacketSize.GetDimensions();
            var files = dir.GetFiles("*.jpg", SearchOption.AllDirectories)
                        .Where(info => FileUtils.ImageFromFile(info.FullName).Size.Equals(size))
                        .ToArray();

            return(files.FirstOrDefault());
        }
예제 #2
0
 public static Size GetDimensions(this JacketSize jacketSize)
 {
     return(jacketSize.GetAttributeProperty <SizeAttribute, Size>(attribute => attribute.Size));
 }
예제 #3
0
 private static FileInfo GetJacketImage(JacketSize jacketSize, DirectoryInfo dir)
 {
     var size = jacketSize.GetDimensions();
     var files = dir.GetFiles("*.jpg", SearchOption.AllDirectories)
                    .Where(info => FileUtils.ImageFromFile(info.FullName).Size.Equals(size))
                    .ToArray();
     return files.FirstOrDefault();
 }