Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }