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