public T GetPagedRequest <T>(String url, bool useAuthorization) where T : IPaged, new() { String currentUrl = url; T masterList = new T(); T returnedValue = null; do { returnedValue = GetRequest <T>(currentUrl, useAuthorization); //Combine these as part of the master list. masterList.Combine(returnedValue); IPaged pagingValue = (IPaged)returnedValue; currentUrl = pagingValue.Next; } while (returnedValue != null && returnedValue.Next != null); return(masterList); }
public abstract void Combine(IPaged pagedObject);
public override void Combine(IPaged pagedObject) { ArtistItems otherArtistList = (ArtistItems)pagedObject; this.Items.AddRange(otherArtistList.Items); }
public override void Combine(IPaged pagedObject) { FollowedArtistList otherArtistList = (FollowedArtistList)pagedObject; this.ArtistItems.Combine(otherArtistList.ArtistItems); }