Пример #1
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, Item> > IRepository <int, Item> .FindAllAsync(CancellationToken cancellationToken)
        {
            IItemRepository self    = this;
            var             request = new ItemBulkRequest
            {
                Culture = self.Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <ItemDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Пример #2
0
        /// <inheritdoc />
        IDictionaryRange <int, Item> IRepository <int, Item> .FindAll()
        {
            IItemRepository self    = this;
            var             request = new ItemBulkRequest
            {
                Culture = self.Culture
            };
            var response = this.serviceClient.Send <ICollection <ItemDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Пример #3
0
        /// <inheritdoc />
        Task <IDictionaryRange <int, Item> > IRepository <int, Item> .FindAllAsync(CancellationToken cancellationToken)
        {
            IItemRepository self    = this;
            var             request = new ItemBulkRequest
            {
                Culture = self.Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <ItemDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith <IDictionaryRange <int, Item> >(this.ConvertAsyncResponse, cancellationToken));
        }
Пример #4
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, Item> > IRepository <int, Item> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            IItemRepository self    = this;
            var             request = new ItemBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = self.Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <ItemDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Пример #5
0
        /// <inheritdoc />
        IDictionaryRange <int, Item> IRepository <int, Item> .FindAll(ICollection <int> identifiers)
        {
            IItemRepository self    = this;
            var             request = new ItemBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = self.Culture
            };
            var response = this.serviceClient.Send <ICollection <ItemDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Пример #6
0
        /// <inheritdoc />
        Task <IDictionaryRange <int, Item> > IRepository <int, Item> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            IItemRepository self    = this;
            var             request = new ItemBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = self.Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <ItemDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith <IDictionaryRange <int, Item> >(this.ConvertAsyncResponse, cancellationToken));
        }