Пример #1
0
 public static IEnumerable<PictureMetadatum> GetMetadata(FileInfo file)
 {
     var imageDirs = ImageMetadataReader.ReadMetadata(file.FullName);
     foreach(var d in imageDirs)
     {
         foreach(var tag in d.Tags)
         {
             var metadatum = new PictureMetadatum
             {
                 DirectoryName = tag.DirectoryName,
                 TagDescription = tag.Description,
                 TagName = tag.TagName
             };
             yield return metadatum;
         }
     }
 }
Пример #2
0
 private static IEnumerable<PictureMetadatum> GetMetadata(string localFileName)
 {
     var imageDirs = ImageMetadataReader.ReadMetadata(localFileName);
     foreach(var imageDir in imageDirs)
     {
         foreach(var tag in imageDir.Tags)
         {
             var metadatum = new PictureMetadatum
             {
                 DirectoryName = imageDir.Name,
                 TagDescription = tag.Description,
                 TagName = tag.TagName
             };
             yield return metadatum;
         }
     }
 }