Exemplo n.º 1
0
        /// <inheritdoc />
        async Task <ICollectionPage <Skin> > IPaginator <Skin> .FindPageAsync(int pageIndex, CancellationToken cancellationToken)
        {
            var request = new SkinPageRequest
            {
                Page    = pageIndex,
                Culture = ((ISkinRepository)this).Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <SkinDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.pageResponseConverter.Convert(response, pageIndex));
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        Task <ICollectionPage <Skin> > IPaginator <Skin> .FindPageAsync(int pageIndex, CancellationToken cancellationToken)
        {
            var request = new SkinPageRequest
            {
                Page    = pageIndex,
                Culture = ((ISkinRepository)this).Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <SkinDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith(task => this.ConvertAsyncResponse(task, pageIndex), cancellationToken));
        }
Exemplo n.º 3
0
        /// <inheritdoc />
        ICollectionPage <Skin> IPaginator <Skin> .FindPage(int pageIndex)
        {
            var request = new SkinPageRequest
            {
                Page    = pageIndex,
                Culture = ((ISkinRepository)this).Culture
            };
            var response = this.serviceClient.Send <ICollection <SkinDTO> >(request);

            return(this.pageResponseConverter.Convert(response, pageIndex));
        }
Exemplo n.º 4
0
        /// <inheritdoc />
        ICollectionPage <Skin> IPaginator <Skin> .FindPage(int pageIndex, int pageSize)
        {
            var request = new SkinPageRequest
            {
                Page     = pageIndex,
                PageSize = pageSize,
                Culture  = ((ISkinRepository)this).Culture
            };
            var response = this.serviceClient.Send <ICollection <SkinDataContract> >(request);
            var values   = this.pageResponseConverter.Convert(response, pageIndex);

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