コード例 #1
0
 public ArtistReleases GetArtistReleases(int artistId, PaginationRequest paginationRequest = null)
 {
     Tuple<int, PaginationRequest> key = new Tuple<int, PaginationRequest>(artistId, paginationRequest);
     if (artistReleasesCache.ContainsKey(key))
     {
         return artistReleasesCache[key];
     }
     return artistReleasesCache[key] = this.discogs.GetArtistReleases(artistId, paginationRequest);
 }
コード例 #2
0
        public override bool Equals(object obj)
        {
            PaginationRequest other = obj as PaginationRequest;

            if (other == null)
            {
                return(false);
            }

            return
                (this.Page == other.Page &&
                 this.PerPage == other.PerPage);
        }
コード例 #3
0
 public SearchResults Search(SearchQuery query, PaginationRequest paginationRequest = null)
 {
     Tuple<SearchQuery, PaginationRequest> key = new Tuple<SearchQuery, PaginationRequest>(query, paginationRequest);
     if (searchCache.ContainsKey(key))
     {
         return searchCache[key];
     }
     return searchCache[key] = this.discogs.Search(query, paginationRequest);
 }