/// <inheritdoc /> async Task <ICollectionPage <AggregateListing> > IPaginator <AggregateListing> .FindPageAsync(int pageIndex, CancellationToken cancellationToken) { var request = new AggregateListingPageRequest { Page = pageIndex }; var response = await this.serviceClient.SendAsync <ICollection <AggregateListingDTO> >(request, cancellationToken).ConfigureAwait(false); return(this.pageResponseConverter.Convert(response, pageIndex)); }
/// <inheritdoc /> Task <ICollectionPage <AggregateListing> > IPaginator <AggregateListing> .FindPageAsync(int pageIndex, CancellationToken cancellationToken) { var request = new AggregateListingPageRequest { Page = pageIndex }; var responseTask = this.serviceClient.SendAsync <ICollection <AggregateListingDataContract> >(request, cancellationToken); return(responseTask.ContinueWith(task => this.ConvertAsyncResponse(task, pageIndex), cancellationToken)); }
/// <inheritdoc /> ICollectionPage <AggregateListing> IPaginator <AggregateListing> .FindPage(int pageIndex) { var request = new AggregateListingPageRequest { Page = pageIndex }; var response = this.serviceClient.Send <ICollection <AggregateListingDTO> >(request); return(this.pageResponseConverter.Convert(response, pageIndex)); }
/// <inheritdoc /> ICollectionPage <AggregateListing> IPaginator <AggregateListing> .FindPage(int pageIndex) { var request = new AggregateListingPageRequest { Page = pageIndex }; var response = this.serviceClient.Send <ICollection <AggregateListingDataContract> >(request); var values = this.converterForPageResponse.Convert(response, pageIndex); return(values ?? new CollectionPage <AggregateListing>(0)); }