/// <inheritdoc /> Task <ICollectionPage <World> > IPaginator <World> .FindPageAsync(int pageIndex, int pageSize, CancellationToken cancellationToken) { IWorldRepository self = this; var request = new WorldPageRequest { Page = pageIndex, PageSize = pageSize, Culture = self.Culture }; return(this.serviceClient.SendAsync <ICollection <WorldDataContract> >(request, cancellationToken).ContinueWith <ICollectionPage <World> >(task => this.ConvertAsyncResponse(task, pageIndex), cancellationToken)); }
/// <inheritdoc /> async Task <ICollectionPage <World> > IPaginator <World> .FindPageAsync(int pageIndex, CancellationToken cancellationToken) { IWorldRepository self = this; var request = new WorldPageRequest { Page = pageIndex, Culture = self.Culture }; var response = await this.serviceClient.SendAsync <ICollection <WorldDTO> >(request, cancellationToken).ConfigureAwait(false); return(this.pageResponseConverter.Convert(response, pageIndex)); }
/// <inheritdoc /> ICollectionPage <World> IPaginator <World> .FindPage(int pageIndex) { IWorldRepository self = this; var request = new WorldPageRequest { Page = pageIndex, Culture = self.Culture }; var response = this.serviceClient.Send <ICollection <WorldDTO> >(request); return(this.pageResponseConverter.Convert(response, pageIndex)); }
/// <inheritdoc /> ICollectionPage <World> IPaginator <World> .FindPage(int pageIndex) { IWorldRepository self = this; var request = new WorldPageRequest { Page = pageIndex, Culture = self.Culture }; var response = this.serviceClient.Send <ICollection <WorldDataContract> >(request); var values = this.converterForPageResponse.Convert(response, pageIndex); return(values ?? new CollectionPage <World>(0)); }