예제 #1
0
        /// <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));
        }
예제 #2
0
        /// <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));
        }
예제 #3
0
        /// <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));
        }
예제 #4
0
        /// <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));
        }