Exemplo n.º 1
0
        /// <inheritdoc />
        Task <IDictionaryRange <int, Listing> > IRepository <int, Listing> .FindAllAsync(CancellationToken cancellationToken)
        {
            var request      = new ListingBulkRequest();
            var responseTask = this.serviceClient.SendAsync <ICollection <ListingDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith <IDictionaryRange <int, Listing> >(this.ConvertAsyncResponse, cancellationToken));
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        IDictionaryRange <int, Listing> IRepository <int, Listing> .FindAll()
        {
            var request  = new ListingBulkRequest();
            var response = this.serviceClient.Send <ICollection <ListingDataContract> >(request);

            return(this.converterForBulkResponse.Convert(response, null) ?? new DictionaryRange <int, Listing>(0));
        }
Exemplo n.º 3
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, Listing> > IRepository <int, Listing> .FindAllAsync(CancellationToken cancellationToken)
        {
            var request  = new ListingBulkRequest();
            var response = await this.serviceClient.SendAsync <ICollection <ListingDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Exemplo n.º 4
0
        /// <inheritdoc />
        IDictionaryRange <int, Listing> IRepository <int, Listing> .FindAll()
        {
            var request  = new ListingBulkRequest();
            var response = this.serviceClient.Send <ICollection <ListingDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Exemplo n.º 5
0
        /// <inheritdoc />
        Task <IDictionaryRange <int, Listing> > IRepository <int, Listing> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            var request = new ListingBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList()
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <ListingDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith <IDictionaryRange <int, Listing> >(this.ConvertAsyncResponse, cancellationToken));
        }
Exemplo n.º 6
0
        /// <inheritdoc />
        IDictionaryRange <int, Listing> IRepository <int, Listing> .FindAll(ICollection <int> identifiers)
        {
            var request = new ListingBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList()
            };
            var response = this.serviceClient.Send <ICollection <ListingDataContract> >(request);

            return(this.converterForBulkResponse.Convert(response, null) ?? new DictionaryRange <int, Listing>(0));
        }
Exemplo n.º 7
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, Listing> > IRepository <int, Listing> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            var request = new ListingBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList()
            };
            var response = await this.serviceClient.SendAsync <ICollection <ListingDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }