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