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