public AggregationSearchTrackItem(Track t, Playlist p, AggregationSearchTrackItem firstItem) { Track = t; Count = firstItem.Count + 1; Playlists = firstItem.Playlists; Playlists.Add(p); }
public AggregationSearchTrackItem[] GetPage(int pageNumber, int pageSize) { if (!_sorted) { Sort(); } AggregationSearchTrackItem[] result = new AggregationSearchTrackItem[pageSize]; int previousItems = pageNumber * pageSize; for (int i = previousItems; i < previousItems + pageSize; i++) { if (i < _sortedItems.Length) { result[i - previousItems] = _sortedItems[i]; } } return(result); }