/// <inheritdoc /> Task <ICollectionPage <Map> > IPaginator <Map> .FindPageAsync(int pageIndex, CancellationToken cancellationToken) { var request = new MapPageRequest { Page = pageIndex, Culture = ((IMapRepository)this).Culture }; var responseTask = this.serviceClient.SendAsync <ICollection <MapDataContract> >(request, cancellationToken); return(responseTask.ContinueWith(task => this.ConvertAsyncResponse(task, pageIndex), cancellationToken)); }
/// <inheritdoc /> async Task <ICollectionPage <Map> > IPaginator <Map> .FindPageAsync(int pageIndex, CancellationToken cancellationToken) { var request = new MapPageRequest { Page = pageIndex, Culture = ((IMapRepository)this).Culture }; var response = await this.serviceClient.SendAsync <ICollection <MapDTO> >(request, cancellationToken).ConfigureAwait(false); return(this.pageResponseConverter.Convert(response, pageIndex)); }
/// <inheritdoc /> ICollectionPage <Map> IPaginator <Map> .FindPage(int pageIndex) { var request = new MapPageRequest { Page = pageIndex, Culture = ((IMapRepository)this).Culture }; var response = this.serviceClient.Send <ICollection <MapDTO> >(request); return(this.pageResponseConverter.Convert(response, pageIndex)); }
/// <inheritdoc /> ICollectionPage <Map> IPaginator <Map> .FindPage(int pageIndex, int pageSize) { var request = new MapPageRequest { Page = pageIndex, PageSize = pageSize, Culture = ((IMapRepository)this).Culture }; var response = this.serviceClient.Send <ICollection <MapDataContract> >(request); var values = this.pageResponseConverter.Convert(response, pageIndex); return(values ?? new CollectionPage <Map>(0)); }