private string MatchAlbumByYear(IEnumerable<ReleaseGroup> releases, Album matchingAlbum)
 {
     List<ReleaseGroup> matches = releases.Where(a => a.Year == matchingAlbum.Year).ToList();
     if (matches.Count == 1)
     {
         return matches[0].Id;
     }
     if (matches.Count > 1)
     {
         return MatchAlbumByTitle(matches, matchingAlbum);
     }
     return null;
 }
 private string MatchAlbumByTitle(IEnumerable<ReleaseGroup> releases, Album matchingAlbum)
 {
     List<ReleaseGroup> matches = releases.Where(a => EqualsIgnoreCase(a, matchingAlbum)).ToList();
     if (matches.Any())
     {
         return matches[0].Id;
     }
     return null;
 }
 private static bool EqualsIgnoreCase(ReleaseGroup release, Album matchingAlbum)
 {
     return string.Equals(release.Title, matchingAlbum.Title, StringComparison.InvariantCultureIgnoreCase);
 }
 private static bool EqualsIgnoreCase(ReleaseGroup release, Album matchingAlbum)
 {
     return(string.Equals(release.Title, matchingAlbum.Title, StringComparison.InvariantCultureIgnoreCase));
 }