Beispiel #1
0
        /// <inheritdoc />
        async Task <ICollectionPage <Continent> > IPaginator <Continent> .FindPageAsync(int pageIndex, CancellationToken cancellationToken)
        {
            var request = new ContinentPageRequest
            {
                Page    = pageIndex,
                Culture = ((ILocalizable)this).Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <ContinentDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.pageResponseConverter.Convert(response, pageIndex));
        }
        /// <inheritdoc />
        Task <ICollectionPage <Continent> > IPaginator <Continent> .FindPageAsync(int pageIndex, CancellationToken cancellationToken)
        {
            var request = new ContinentPageRequest
            {
                Page    = pageIndex,
                Culture = ((ILocalizable)this).Culture
            };
            var response = this.serviceClient.SendAsync <ICollection <ContinentDataContract> >(request, cancellationToken);

            return(response.ContinueWith(task => this.ConvertAsyncResponse(task, pageIndex), cancellationToken));
        }
Beispiel #3
0
        /// <inheritdoc />
        ICollectionPage <Continent> IPaginator <Continent> .FindPage(int pageIndex)
        {
            var request = new ContinentPageRequest
            {
                Page    = pageIndex,
                Culture = ((ILocalizable)this).Culture
            };
            var response = this.serviceClient.Send <ICollection <ContinentDTO> >(request);

            return(this.pageResponseConverter.Convert(response, pageIndex));
        }
        /// <inheritdoc />
        ICollectionPage <Continent> IPaginator <Continent> .FindPage(int pageIndex, int pageSize)
        {
            var request = new ContinentPageRequest
            {
                Page     = pageIndex,
                PageSize = pageSize,
                Culture  = ((ILocalizable)this).Culture
            };
            var response = this.serviceClient.Send <ICollection <ContinentDataContract> >(request);
            var values   = this.pageResponseConverter.Convert(response, pageIndex);

            return(values ?? new CollectionPage <Continent>(0));
        }